Audit your WordPress Themes for Less Errors and Greater Compatibility

Results from using the Theme Check plugin

If you get into the business of building WordPress themes, you want to make sure that they’re of the best quality, and I’m not talking about what they look like: I’m talking about the code doing the work behind the scenes.

Themes require a lot of specific code as standard, so that plugins can hook into actions and fire at the right time, for instance adding tracking codes to the headers and footers of each page: without wp_head and wp_footer in your code, your theme would break a lot of plugins.

And that’s where the Theme Check plugin comes in. It is maintained by Simon Prosser and Samuel Wood, two highly regarded WordPress developers, and it’s the official plugin used by the theme review team to make sure that all themes submitted to the repository are of the highest quality and compatibility.

Once you’ve installed the plugin, you can access it at Appearance >; Theme Check. From there, you can select any of the themes on your site, and run them through the tests. To give you an idea of the scale of this plugin, the current version runs 6601 tests on each theme. That’s very stringent testing!

I gave it a go and ran one of the latest themes I had built through it, and it brought up a number of recommendations, information and warnings. The warnings are items that really need to be addressed, the recommendations are suggestions for best practices and the info just highlights some things that you might want to be aware of, such as hard-coded links in your theme.

Results from using the Theme Check plugin

As you can see from my results, I had a few errors and recommendations that needed addressing, but all-in-all, for having run over 6000 tests, I didn’t do too badly. I also decided to run both Twenty Ten and Twenty Eleven through the Theme Check plugin, and sure enough, they passed with flying colors – not a single error or omission.

So, if you ever get to building a theme, or even a child theme, make sure you run it through the Theme Check, so that your code is of good quality and you don’t end up breaking any plugins.

10 thoughts on “Audit your WordPress Themes for Less Errors and Greater Compatibility”

  1. Robert says:

    What if I bought a theme from a provider and found many errors in the code? Shall i contact them for immediate fix on that WP theme?

    1. I’d say not. If the theme is missing very important calls like wp_head, then absolutely: the code is so poor that the theme is useless. However, if the theme has a few errors and warnings, I don’t think it warrants a refund, but it might be worth mentioning it to the author so that they can consider updating it.

  2. Would you recommend running the test on a theme still without the plugins? Or will it still be good to check with the plugins already installed? I have a couple of free themes with installed plugins that I want to run with Theme Check.

    1. It won’t matter whether the plugins are installed or not, as the theme check runs through the theme files only and other plugins don’t affect this.

  3. Anoop says:

    Think you misplaced “theme” with “plugin” in the fourth paragraph .. though not a big thing ;)

    1. Thanks for your eagle eye. I’ve fixed this now

  4. Wow…I ran the tool against a theme I built 2 years ago and…well…the results weren’t good. BUT, at least I know now some opportunities to improve the theme. The good news is my later themes faired a lot better ;)

    Thanks for the tip!



  5. Mike says:

    Great stuff! Recently I’ve been using just a couple themes for my wp site development – Canvas by woothemes is a great blank theme that lets you customize and make a site for anyone. The problem with many theme providers is, while the code may validate now, can you trust the author to make updates for future wordpress releases? That’s why I’ve narrowed my theme stable to just a couple that I can trust with tools like themecheck.

    Now, I’m off to run themecheck on all my client sites – thanks for the info!

  6. Frank says:

    I recently started using wordpress and I am very impressed with the friendly user-interface and all the possibilities with plugins and themes.
    I created a child theme and adapted some things with my limited php skills. Now I am curious what this check will say. Thanks for the tip!

  7. Ryan says:

    This is really interesting, I ran it against my word press site and found a ton of errors. I guess the wp theme I purchased didn’t like being tweaked as much as I had thought. It give me a good place to start so i can hopefully correct the errors.

Leave a Reply