Is Your WordPress Code Behaving Badly?

Last June Dragan and I published our very first public WordPress plugin. It was pretty successul, still sells well, so if you need an author box WordPress plugin for your blog, please check it out. End of plug, I promise.

We had no idea what to expect, more than anything how much time we’d spend supporting the plugin. Turns out that even the little worry we had was there for no good reason. Of course, that doesn’t mean there were no support requests at all. However, huge majority of them were not caused by our plugin doing something wrong, but by it not being allowed to do something right instead.

What our plugin does is use the_content filter to append or prepend the author box to posts. That’s WordPress’ way to do it and there’s nothing wrong with it. Still, the most common complaint we’ve had was that the author box was not showing. Why would that happen? For reasons unknown to me, some theme developers love owning the_content filter and removing all functions previously attached to it. No, I don’t know why anyone would do that.

“My tabs are not working” is another one we’ve been getting consistently. Having a javascript error caused by theme or another plugin certainly doesn’t help a plugin that uses jQuery. Of course a user is not to blame for things like this, why would they even want to know what a javascript error is, let alone how to fix it?

WordPress code behaving badly

Another problem we’ve had is plugin’s CSS conflicting being overriden by theme’s style.css file. Of course things like this will happen, but if a theme developer thinks unordered list items inside his or her posts should use a certain arrow then using a selector as generic as li is probably not the best way to do it. Another example would be adding floats to .avatar selector. That class is added to all images added by get_avatar function btw.

I won’t even begin ranting about themes not using wp_head and wp_footer or deregistering bundled jQuery without a good reason.

All these examples bring me to a point: What is the right thing to do in a situation like this? Is it ethical to point your finger at another developer and say they messed up? Get in touch with them and let them know? Should you even offer support when something like this happens? So far, we’ve been able to help every single customer that had any issues, no matter what caused it, but that’s about as scalable as a house of cards.

WordPress ecosystem consists of WordPress core, themes and plugins. Sadly, all it takes to make a building bad place to live is one neighbor constantly making noise. The other tennants know who that person is, but those walking by the building have no idea and probably don’t care, all they hear is noise. So, what is the right thing to do, if you’re living next to the noisy guy?

P.S. As WPExplorer pointed out in the comments, there’s the issue of users running outdated themes and plugins, or even WordPress. Not the point I was trying to, but still a very valid one and another reason why things might go wrong :)

4 thoughts on “Is Your WordPress Code Behaving Badly?

  1. Over and over I see people having issues with their themes/plugins only to find out there are using a theme/plugin created and last updated 3-5 years ago. You can’t really blame developers entirely for “bad code”, its also the responsibility of the user to make sure that the software they are using is current before they start pointing fingers and complaining about issues. Also people are downloading themes/plugins from sketchy places.

    It’s important for users to also make sure they are getting their plugins/themes from the correct location. For example I made a theme 4 years ago which of course was following older practices and these days would have issues. Other sites thought it would be a good idea to store my theme on their server and offer the download rather then linking to my site – result? People find these sites and download an outdated theme, it causes issues, then they start raging the developer of the theme, or worse plugin developers for their problems ;(

    It’s pretty difficult to have a perfect WP environment where all plugins/themes can co-exist and work perfectly. But I do think if the user takes a bit more responsibility it can really help the community a lot. If we can educate users to be a bit smarter when choosing the themes they use or even better if we can educate people to hire freelancers for assistance, it would take a huge load off the developers so they can focus more time keeping their product up to date and issue-free and less time providing answers to the same questions/compatibility issues over and over again.

    ;)

    • You’re 100% correct on old themes/plugins and I should’ve covered that angle as well. Just haven’t thought of old themes, I was mostly referring to new ones that just ignore best practices, but your point is very valid.

      I think educating users and managing their expectations really is the key to WordPress staying as great as it is. And don’t get me wrong, I’m not saying WordPress is being ruined or anything like that, just that it seems so easy to make it even better.

      • Yep, new themes need to follow proper standards which you nailed. Just wanted to bring up the old themes issue, because it is huge. And also I hate getting crap from someone using a theme I made 4 years ago which I no longer even provide, yet they someone managed to download it somewhere and then complain it doesn’t have WP 3.5+ features – lol.

        • Good point on old themes. What do you think about updating the theme one last time, just so a notification can be shown, to let users know you no longer provide support for it or upgrade it? Could do the trick.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>