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