Theme checklist before submitting to the WordPress theme directory

A screenshot of the Upload Theme page of the WordPress theme directory
So you have a really cool theme that you’ve developed. And now you want to submit it to the WordPress Theme Directory for others to use. But this is the first theme you’ve created for the theme directory, and you’re not sure if your theme is quite up to their standards. Don’t worry. You’re not the only one who’s been in this situation. In fact, in 2014 I submitted Nuovo for review as my first theme and went into the process completely blind. Ten months later, Nuovo finally made it’s way into the directory. I learned a lot from that experience that has helped me become a much better developer. My next three themes took much less time to review precisely because of what I took away from Nuovo. So now I want to pass on what I’ve learned to you, first-time submitter to the directory. The following list will help you make sure your theme is as good as it can be before submitting so your review process takes less than 10 months. So let’s go! Slight disclaimer: I’m not a part of the review team, so don’t take all of these as set in stone fact. Every reviewer has slight varied views on some items, so use this list as a general guide to reviewing your own code.

Make sure the theme doesn’t add functionality

I’ve harped on this one a bit the past few weeks, but you can not have a theme that adds functionality. That’s not my rule; that’s the rule of the Theme Review Team. And it’s really a good rule. As I have mentioned countless times before, adding functionality will hurt users eventually. If they switch from your theme to another and your theme has added custom post types, they’re going to “lose” that data and not be able to use it anymore. That makes them frustrated, and it’s not really a great look for you either. So if you want you’re review to go quicker, go through your theme and make sure you’re not adding any functionality. That means no custom post types or taxonomies or shortcodes and the like. And if functionality is an absolute must, you need to put it into a functionality plugin to go in the WordPress plugin repository. I did that with Giornalismo and JM Breaking News and it was a super smooth process. But no matter what, no functionality.

Make sure data is sanitized and output is escaped correctly

This one that I didn’t really think about until I started the review process with Nuovo. Every bit of data that a user can enter into a site needs to be sanitized so that no malicious content can be added or the user to accidentally take down the site (see the student drop tables comic). So if you have , like theme options, you need to make sure that when the user hits save, you’re sanitizing that data. You need to make sure numbers are numbers, plain text has no HTML, and that at no point are any scripts allowed into the site. Also, you need to make sure that any output is escaped properly. That means using esc_url to output URLs and esc_attr to output element attributes. There are exceptions to this, mainly when using common WordPress functions like the_title, the_content, the_excerpt and the like. Data is already escaped properly inside of those functions, so you don’t need to do any more escaping. You can use these sanitize and escaping functions to make sure your theme is doing things correctly.

Theme options go in the Customizer

This rule is about 2.5 years ago, and it finally seems like the “controversy” with it has finally died down. In the spring of 2015, the Theme Review Team made it mandatory for new themes, and eventually all themes, to use the customizer instead of a separate theme options page in the admin like plugins do. I remember the uproar of folks having to now use this relatively new feature. And I also remember having to make quick changes for in on Nuovo which was still in the review process at that point. But looking back on it now, I like that rule. It allows the end users to make changes that affect their site, like customizing the home page or changing colors quick and they don’t have to keep going between an options page and the front end of their site. So if it’s easier for users, that’s all that matters. So make sure that you’re using the customizer for your theme options. If you’re not, you can use the Customier guide on WordPress.org to make that change.

Make sure all necessary theme template files are there

Okay, so this one seems so simple, but yet it’s the simple things that trip us up. Before you submit, make sure that you have all of the necessary template files in there. Make sure you have style.css file with the correct header and a functions.php file. Be sure the theme has an index.php file and all of the other template files you’re using, like home.php, single.php, archive.php, etc. And finally, make sure you include a screenshot image, named screenshot.png, that’s at a 1200px by 900px and shows off the front page of your theme. And now you’re almost ready to submit.

Make sure it’s ready to go

We’re almost ready to submit this theme, but we still have one task left: make sure it’s truly ready to go. Before you ship it, go through all of the code and check it for any errors, be it syntax, incorrect variable usage, not sanitizing or escaping or anything else that might cause a hang up in the review process. This is your last chance to make sure everything looks good for the first review, so spend some time making sure it’s all good. It really could save you time in the end.

Go submit it!

Okay, so now you’re basically ready to submit it. You created a cool theme, you’ve done everything right per the standards of the Theme Review Team, and you’ve got clean code. Now go on and submit it for review and pat yourself on the back. You’re contributing to WordPress! Now just be patient for the review process to begin, be nice to your reviewer and before you know it your theme will be in the directory for anyone to use. Congrats!

Leave a Reply

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