PSA: 3 Things WordPress Developers Need to Stop Doing

I have a few pet peeves. Okay, I have more than a few; but this post will go over three of my big ones as regards WordPress development.

3: Using user level numbers instead of capabilities

Come on people. Numeric user levels were deprecated 11 major releases ago (2.0). 11 versions! It’s like table layouts. Just stop doing it. Being able to check on capabilities is so much better.

2: Checking whether the dynamic_sidebar function exists

Really? You’re writing themes to be backwards compatible to WordPress 2.1? 1 I hope you’re not using the current Widgets API; that didn’t come around until 2.8 and would break all those themes before 2.8! Oh noez!!1!

At this point, you can count on dynamic_sidebar existing. Twenty Ten does.

1: Developing AT ALL with WP_DEBUG turned off

Your code should not produce errors. Period. Undefined index errors are still errors; just because it doesn’t halt execution doesn’t mean it’s not an error. I run WordPress with debug on more often than with it off because I am constantly developing something. Often the theme I’m developing works in tandem with a plugin, or the site uses a plugin to extend functionality (like TinyMCE Advanced). I hate, hate, hate seeing things like this:

when it should look like this:

If you don’t do any of these things, you’re awesome. If you do any of these things, you’re still awesome, but your code might not be (I say might not be only because developing with debug turned off doesn’t necessarily mean your code has errors). Please stop doing these things. I used to do all three of these things, so please don’t see this as an attack; this is more of a PSA.

If you made it this far, here’s a treat.


  1. Even John Croston’s theme doesn’t need to check for dynamic_sidebar!

Kansas boy transplanted to DC. English major transplanted to web development. Lover of things.

1 Comment

  1. Michael Fields · November 22, 2010

    Nice. Totally agree with your list. I would like to add one which is probably the (2nd) biggest pet peeve that I have:

    “Stop Talking to my visitors!”
    If something goes wrong (incorrect configuration, web service cannot be reached… etc.) There is no reason to alert my visitors about it. Feel free to tell me or other’s that have been granted the capabilities to DO something about the error.