Theme Mentor – inspired by Theme-Check

Today I finally released the first version of Theme Mentor – a theme review plugin inspired by the almighty Theme-Check. Over the last year I have spent more than 200 hours fixing themes for the WordPress.org repository gone through the Theme-Check tests. There are numerous issues not covered by Theme-Check, easy to miss during your review or development process. Truth is, most of them are absolutely valid and an algorithm couldn’t be built so smart to determine whether it is a real error or not. Few of the problems covered by the first Theme Mentor version:

  • <link> or <script> tags in template files (not necessarily critical, but odds are you can resolve them properly)
  • query_posts calls
  • misspelled WordPress (i.e. all-caps or small P)
  • deregister/dequeue of jquery
  • missing wp_title function in <title> head tags

and a few more.

Theme Mentor is designed to cover every possible scenario from a subset of errors. It’s average success rate is about 70% (according to internal tests). Nevertheless, Theme Mentor is listing common errors for authors or reviewers to double check. There’s nothing bad in checking a piece of code after a notice and reassuring that everything is OK. But it’s better to have the chance to find typos or violated standards within the reported list.

Use it together with Theme-Check, as an extra subset of tests.

Note: it’s the first released version this weekend so don’t hesitate to report issues or extra validations to be covered. The project lives on GitHub under the Theme Mentor repository.

4 thoughts on “Theme Mentor – inspired by Theme-Check”

  1. Chip Bennett says: February 17, 2013 at 2:25 am

    Awesome stuff!

    Any thoughts to pushing these as patches back to Theme-Check? The more tools, the better, but the easier we can make it for Developers and Reviewers (by having fewer Plugins to install), the better.

  2. Mario Peshev says: February 17, 2013 at 3:03 am

    Thanks, Chip!

    I’ve been thinking for a good while before I started the project (took me a few months of brainstorming). I’m still open to cooperation with Simon and Otto, but in my opinion the two products are two different paths. Theme-Check is pretty accurate for displaying required and recommended remarks from the Theme Review guidelines, as well as some additional info messages for things like hardcoded links. My plans for Theme Mentor are covering as many comments from reviews as possible even if about 1/3 of them are potentially irrelevant.

    Theme-Check is the Cerberus you could leave at the gate as it is now before uploading a theme – you can’t get in when Theme-Check says no. Which is cool.

    Still, there are probably hundreds of replies from WPTRT members marking tickets as non-approved as Theme-Check can’t say for sure when there’s a potential issue. Therefore it’s silent.

    Theme Mentor is more of an internal tool for us, reviewers, as well as for good theme authors who want to improve their theme codebase even more. There are tens of validations in the queue to be implemented in the next weeks such as:

    -checking for duplicate IDs in the same template file
    -report when more than 1 text domain has been used in translation functions (regular copy-paste issue)
    -verify for esc_attr/esc_url functions for variables inside of attributes

    and many more. The algorithm might not cover the edge cases, but it provides an extra layer of notifications and it’s up to you to double check that your implementation is valid or find a bug that is not covered by the Theme-Check algorithm.

    I hope that it makes sense here, basically I say that the plugin returns 20-30% of fault notices and I’m good with it and it’s actually true. I’d rather have 90%+ of the theme review notes as ‘notices’, ‘reminders’ and ‘memos’ in a few months from now to use as a checklist while Theme-Check is responsible for the certainty and preciseness of the strict cases.

Leave a Reply

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