This year I had the opportunity to travel to WordCamp San Francisco where I saw a myriad of great speakers and met a ton of great WordPress developers, users, and everything in between. One of the most influential talks, for me at least, was by Michael Fields on “Extendable Extensions”. You can watch the video on

So, after a while I started try and find ways I could include this in my plugins. Let me tell you, I’ve never coded like this before. While attempting this, I’ve started to realize how non-friendly my code was to other developers or people who wanted to change just the smallest detail about the output of my plugin. I was pretty pumped at this point to move forward and with Pushover Notifications for WordPress, I’m living it. Pushover Notifications for WordPress is pretty extensible, and is getting more and more extensible with every release.

Here’s 5 things I’ve started focusing on while writing my plugins to help make them more extensible.

apply_filters All The Things!

apply_filters() is BY FAR the easiest way to make your code extendable. If your plugin displays text to a user and you can think of even 1 instance where someone might to change your verbiage, apply_filters(). If you have an array of elements, and you think someone might want to add more to it at any point, apply_filters(). This is a great tool, if you use it correctly. Don’t just pass along the string or array you want to modify. The function also allows arguments to be passed. If you are modifying user data, send the user ID as an argument, if it’s post content send the post ID. You get the point.

Read more about apply_filters() in the codex.

Make your admin menus extendable

I’ve started putting do_action() references to my settings pages and it’s helped me realize that not only can someone change the content of your current settings, but they can add their own settings to your plugin. This is the next step in full extensible-ness. Without this, your plugin will eternally be just your plugin, nothing more, nothing less. Take it to the next level by putting in your own action hooks for people (or even yourself) to extend into.

Never assume your core plugin is available

If you’ve already started doing the first two items I’ve listed, then this is your most important take away. It’s easy in our development sandboxes to think miss a real world scenario. I mean, who really would deactivate our one of our plugins that requires another?

Well, users do, and as developers, it’s our job to make sure we degrade gracefully. I failed this goal recently and let me tell you, it sucks. Use the ‘function_exists’ and ‘class_exists’ functions to verify the function or method you are about to use is available to you, prior to executing. Building plugins that work together can yield great results, just make sure you are yielding on the side of caution when relying on content from outside the core plugin.

In my scenario, one of my extensions to Pushover Notifications for WordPress was calling a method in the core plugin looking for some settings. The error happened when the core plugin was being upgraded through the WordPress automatic updater. For a brief moment, my core plugin was unavailable while the changes were being applied, which caused my extension to return a server 500 error, halting the upgrade and corrupting the core plugin. How am I preventing it now? I’m avoiding calls to the core plugin, and running function_exists checks prior to any calls to the core plugin.

Everybody wants a Log

Some of you may not get that reference, but the phrase “It’s better than bad, it’s Good” is oh so true. If you are building something for every day use by others, build in the option for logging functionality. It makes it easier for you to troubleshoot errors in development but also makes your user’s feedback more valuable. If you don’t quite know how to start with logging, try out Pippin’s Plugins WP_Logging General Logging Class for WordPress

Be embarassed by 1.0

There’s a famous Opbeat Engineering quote that’s slightly uncouth but goes something like this:

F*** It, Ship It

Since we’re talking WordPress here, let’s look at a slightly more classy rendition of the same principal, courtesy of (Matt Mullenweg):

…if you’re not embarrassed when you ship your first version you waited too long.

You’re going to have mistakes, unknown conflicts, and in some cases failure. That’s part of learning and executing. Failure is always an option, but that’s not a bad thing. Ship early, ship often, and never stop creating. The only thing better than getting your first bug report, is closing your first bug report as fixed. Also, bug reports mean people are using your product. Think of it that way.

I know this got a little long winded and probably isn’t as technical as some people may want, but these are the 5 key points I’ve been trying to keep in my mind while working on my latest batch of extensions and it’s really helped change my mindset on how I write my code.

Post Image via Flickr & Creative Commons by ATOMIC Hot Links

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.


  1. I am regular visitor, how are you everybody?
    This paragraph posted at this web page is genuinely fastidious.


  2. Hi there! Do you know if they make any plugins to help with Search Engine
    Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
    If you know of any please share. Kudos!

    Have a look at my web page Greg


  3. Hello, you used to write magnificent, but the last few posts have been kinda boring…

    I miss your super writings. Past several posts are just a bit out of track!
    come on!

    Here is my blog post Beatrice


  4. Usually I do not read article on blogs, but I wish to say that this write-up very compelled me to take a look at and do so!

    Your writing style has been surprised me. Thank you,
    very great post.


  5. What a stuff of un-ambiguity and preserveness of valuable know-how about
    unexpected emotions.

    Also visit my webpage – Keto Premium Shot Pills


  6. I gotta favorite this internet site it seems handy handy.

    my site – QuadAir Drone Reviews


  7. Peculiar article, totally what I was looking for.


  8. Hi there outstanding website! Does running a blog similar to this take a great deal of work?
    I have very little understanding of computer programming but I had been hoping to start my own blog in the near
    future. Anyway, should you have any ideas or tips for new blog owners please share.
    I understand this is off subject but I just needed to ask.
    Thank you!


  9. Howdy! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest writing a
    blog post or vice-versa? My site goes over a lot of the same
    topics as yours and I think we could greatly benefit from each other.
    If you are interested feel free to shoot me an email. I look forward to hearing from you!
    Excellent blog by the way!

    Also visit my site :: Unique Body Keto Pills


  10. I blog quite often and I seriously thank you for your content.
    The article has really peaked my interest. I am going to
    take a note of your blog and keep checking for
    new details about once a week. I subscribed to your RSS feed too.


  11. cheap viagra reviews buying viagra in bali ViagraCND100Mg – viagra sildenafil


  12. zithromax generic cost zithromax coupon – buy zithromax without presc


  13. stromectol without prescription stromectol ivermectin for humans – ivermectin eye drops


  14. ivermectin 50ml generic stromectol – purchase stromectol online


  15. medication online ed meds online without doctor prescription – ed medicine online


  16. best online canadian pharmacy how to get prescription drugs without doctor – ed problems treatment


  17. where can you buy lexapro buy lexapro no prescription – lexapro 20 mg coupon


  18. hydroxychloroquine 100 mg hydroxychloroquine – buy plaquenil uk


  19. viagra amazon sildenafil – viagra without a doctor prescription usa


  20. Greate pieces. Keep posting such kind of information on your page.

    Im really impressed by your blog.
    Hi there, You’ve done a fantastic job. I’ll certainly digg it and for my part
    recommend to my friends. I am sure they will be benefited from this web site.


Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.