Theme developers have a tough job. Not only do they have to design the theme’s appearance, they build it out in PHP, HTML and CSS, work on likely compatibility issues, and manage support tickets that come through from users like you and me. That’s a ton of work, and if you’re planning on putting your plugin in the official WordPress.org repository, there’s an additional set of hoops you have to jump through: making sure your theme meets the official requirements of the WordPress theme review process.
Passing the WordPress Theme Review
If you’re an aspiring theme dev, the thought of passing theme review is scary. It’s a little like defending your dissertation — after a lot of work, you have to prove your baby has what it takes to stand on its own. Thankfully, there’s a Theme Check plugin that’s a pretty good cheat-sheet for your review. Even if you do things right and your theme checks out, you are dealing with 15 different categories of WordPress theme review requirements (and that’s not including sub-requirements or recommendations.)
- Core Functionality and Features
- Presentation vs Functionality
- Options and Settings
- Selling, Credits, and Links
- Stylesheets and Scripts
Now, keep in mind that before April 2018, this was a manual process. The Theme Review team of volunteers looked over every single theme that was submitted to the repo, which made for a pretty hefty delay between submission and publication. However, since then, theme review has moved into a more automated system, with the Theme Review team only checking for “security, licensing, malicious or egregious stuff, and content creation.”
With that in mind, the onus is on you to pass the robochecks, and because they’re robochecks, a plugin like Theme Check will come in pretty handy.
What Exactly Does Theme Check Do?
It runs a series of unit tests against your code to make sure they pass. That’s it. If you’re familiar with TDD (test-driven development), it should be nothing new. In a nutshell, that’s what you’re doing here: run a test, if the code passes, you move on. If not, you rewrite the code until it does.
The automated theme checking for the WordPress.org repository runs under the same principle. Passing these tests are the bare minimum for inclusion.
Who Are These Tests For?
If you’re not a developer, there is very little reason for you to install and run this plugin. Sure, it will give you some interesting data about the theme you’re running, but won’t do much other than satisfy some curiosity (or maybe it could be for professional development, just to see what you’re going to be in for). But if development and deep-diving into WordPress isn’t going to be your thing, you may want to just let this one pass you by.
Running the Tests
Actually running the WordPress theme review checks are pretty easy. When you install and activate the plugin, a new menu item appears at Appearance – Theme Check. The theme-check page itself is relatively simple.
You get a dropdown menu with a list of all your installed themes. You can check the theme even if it isn’t your active one — the plugin is just running tests against the code. When you hit Check It!, thousands upon thousands of tests run in the blink of an eye. The results will pop up as either a report of errors or an all-clear message.
When There Are Errors
For this installation of Divi, Theme Check ran 66,265 tests. And there were more than one errors found. That’s okay, and I’ll address why below. For now, let’s focus on the 4 kinds of alerts you get:
What Do These Mean?
A Required (1) flag is pretty straightforward. If you are going to be in the WordPress.org repo, this is a necessity. For the most part this flag comes up when it’s a rule you didn’t follow. Maybe you hit the admin bar or, as you see below, the text domain is missing from the style.css header. Generally, you can add in the requirements by just making sure you dot your i’s and cross your t’s.
The Warning (2) flag, however, is when the code itself or your files don’t line up with the official standards. Such as below, Divi appears to be in the wrong directory (it’s not), so it calls attention to a mechanical fix with a warning.
And then there is the Recommended (3) tag that shows up in green when you do something that WP.org doesn’t consider a best practice. As you can see below, they think the thumbnail should be bigger, but will accept it as long as the ratio is 4:3.
When it comes to Info (4), they’re just telling you stuff you may want to know. Such as maybe you were hard-coding links instead of using relative paths or functions.
Since this info is take-it-or-leave-it, there’s even a Suppress Info checkbox beside the button that begins the check. So if you don’t want to bother with it, don’t.
When It’s All Clear
When you hit that Check It! button and there are no errors in your theme (according to this particular set of tests, at least), you get a pretty green box that says Your Theme passed the tests. It’s kind of like a WordPress theme review certificate of achievement for your efforts.
Keep in mind, however, that you may still see the Recommended or Info flags. You passed all the required tests that means you followed all the rules and coded according to the standards in the WordPress Codex, but you may still have a few things they think you could do better or should know about.
In this example above, for instance, it’s the official theme Twenty Seventeen. And it has recommendations for better practices, as well as a reminder for the authors to put it through the accessibility review. And that’s the default WordPress theme that comes with every installation. If there are still recommendations for that one, don’t feel bad if yours comes back with a few.
Why It’s Okay To Have Errors
And if your theme comes back with a slew of errors, don’t fret. Divi and pretty much every premium theme out there get flagged somehow. That’s okay. Because they aren’t hosted on the WordPress.org theme repository. Yes, there are official WordPress theme standards, but that’s only to make sure that everything users can get from WordPress.org is vetted and verified.
These requirements have nothing to do with a theme’s compatibility with WordPress. They are not hard and fast rules for WordPress itself, just the theme repo.
When it comes to third-party and premium themes, they play by their own rules. Users who buy premium themes aren’t looking for the status quo. If you run Theme Check against pretty much any premium theme, there will most likely be warnings and requirement flags abound. Each company has their own best practices and coding standards, that while they adhere to the WordPress Way in a general sense, are designed to enhance their product as much as possible.
That said, the exception to this is for freemium themes. That is, those themes that have a Lite or Feature-Limited version in the WordPress.org repository, but then allow users to upgrade to a Pro version or pay to unlock additional features. Since they will be initially hosted on the official repo, they have to meet the same base standards set out in the codex. The premium/upgraded version, however, once purchased, does not have to.
Where Do We Go From Here?
Well, if you’re a theme dev or want to be, you should absolutely make yourself familiar with the WordPress theme review standards, requirements, and recommendations. Then, honestly, I’d run a few checks on themes that are out there. See what is going on behind the scenes of your favorite themes. That’s the best way to learn and grow, really. And if you already have some themes under your belt, but haven’t checked them, do so. If you’re close to the requirements, maybe consider a freemium theme, too? Maybe this simple plugin could open up a whole new angle of business for you.
What have you learned about the WordPress theme review process over time? Share your insight in the comments!
Article featured image by Heavypong / shutterstock.com