Results from using the Theme Check plugin
Results from using the Theme Check plugin

Audit your WordPress Themes for Less Errors and Greater Compatibility

| 10 Comments

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 wordpress.org theme review team to make sure that all themes submitted to the wordpress.org 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.

Categories: Plugins, Themes | Permalink

What next?

Hire me

If you couldn't quite manage this yourself, find it too intimidating, or just don't have the time to do it, you can always hire Dave to do it. Please get in touch so that we can discuss your needs.

Leave a comment

If you have a question, update, or comment about the tutorial, please leave a comment. I try and respond to every comment, though it may take a few days, so please check back soon.

Keep your site backed up, updated & secure

I provide a service called The WP Butler, which helps you stay on top of the maintenance of your WordPress site. Instead of worrying about whether your site is secure, updated and backed up, The WP Butler handles all that for you on a regular basis, so that you can focus on doing what you do best. If you use coupon DIWW, you'll save 15% on our already-low-prices for all maintenance plans.

Author: Dave Clements

Dave Clements has been building websites for close to a decade and in 2010, he formalised that by starting his own company, The UK Edge. He now works on a variety of web projects, from simple tasks like installing a new WordPress site, to consulting on problems, or redesigning his clients' sites. He also runs Do It With WordPress, a site dedicated to providing free tutorials on WordPress. When he's not building your new website, you can find Dave eating Wheat Thins, spending time with friends and family, watching Indie films, fostering kittens from the local Humane Society, listening to some dubstep, dance and electronic rock, and exploring the world.

10 Comments

  1. 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?

    • 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.

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

  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!

    Cheers!

    –Sean

  5. 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. Hi,
    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. 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