Information on this page may be out of date.
The following are all the checks that the Theme Check plugin performs.
Themes have to pass the Theme Check plugin without errors before they can be included in the theme directory.
You can get the plugin from the plugin directory or you can get the developer version on Github.
Admin menu
- Check for levels deprecated in 2.0 in creating menus.
- Check for add_admin_page
Check for bad things
- Themes should not change server PHP settings
base64_decode()
is not allowedbase64_encode()
is not alloweduudecode()
is not allowedstr_rot13()
is not allowed- Google search code detected
- Google advertising code detected
eval()
is not allowed.- PHP system calls are often disabled by server admins and should not be in themes
String checks
- DOCTYPE
wp_footer
wp_head
- language_attributes
- charset
add_theme_support
comments_template
wp_list_comments
comment_form
body_class
wp_link_pages
post_class
comment-reply
body_class
register_sidebar()
orregister_sidebars()
CDN
- bootstrap-maxcdn
- bootstrap-netdna
- bootswatch-maxcdn
- bootswatch-netdna
- font-awesome-maxcdn
- font-awesome-netdna
- html5shiv-google
- html5shiv-maxcdn
- jquery
- respond-js
Constants
- Use get_template_directory() rather than TEMPLATEPATH to return the template path.
- Use get_stylesheet_directory() rather than STYLESHEETPATH to return the stylesheet path.
- PLUGINDIR
- MUPLUGINDIR
General
$content_width
Customization
add_setting
sanitization callback- Sanization callbacks
Deprecation checks
- All the following deprecated:
- checks: https://github.com/Otto42/theme-check/blob/master/checks/deprecated.php#L11
- https://github.com/Otto42/theme-check/blob/master/checks/more_deprecated.php#L16
Line endings
- DOS or UNIX style line endings
Additional checks
- .git
- .svn
- File checks: https://github.com/WordPress/theme-check/blob/master/checks/filenames.php#L26
- readme.txt
- Supports standard avatar functions
- Il8N errors
- PHP filesystem calls
- PHP short tags
- Pagination code
home_url()
correct usesite_url()
correct useget_search_form
rather than searchform.php- Tags
wp_title
- hardcoded text in
title
tag - Use *_url() template tags, rather than bloginfo() equivalents.
- No disabling of the admin toolbar.
Text domain
- If one exists
- Matches theme slug
Styles
- Theme name
- Description
- Author (recommended)
- Version
- License
- License URI
- .sticky
- .bypostauthor
- .alignleft
- .alignright
- .aligncenter
- .wp-caption
- .wp-caption-text
- .gallery-caption
Screenshot
- Correct size and dimensions (1200×900 preferred)
- That a screenshot exists
Plugin Territory
register_post_type
register_taxonomy
- shortcodes (warning only)
Widgets
register_sidebar()
anddynamic_sidebar
- Sidebars registered through widgets_init
Recommended checks
add_editor_style
the_post_thumbnail()
- sidebar/widget area
Security
Info
- iframes
- include or require and advise should use template loading
- possible hardcoded links
- nav-menu check
- non-printable characters
- post format check for implementation (if you load it use it)
- hardcoded dates