Theme Check Plugin

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

Top ↑

Check for bad things

  • Themes should not change server PHP settings
  • base64_decode() is not allowed
  • base64_encode() is not allowed
  • uudecode() is not allowed
  • str_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

Top ↑

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() or register_sidebars()

Top ↑

CDN

  • bootstrap-maxcdn
  • bootstrap-netdna
  • bootswatch-maxcdn
  • bootswatch-netdna
  • font-awesome-maxcdn
  • font-awesome-netdna
  • html5shiv-google
  • html5shiv-maxcdn
  • jquery
  • respond-js

Top ↑

Constants

Top ↑

General

  • $content_width

Top ↑

Customization

  • add_setting sanitization callback
  • Sanization callbacks

Top ↑

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

Top ↑

Line endings

  • DOS or UNIX style line endings

Top ↑

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 use
  • site_url() correct use
  • get_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.

Top ↑

Text domain

  • If one exists
  • Matches theme slug

Top ↑

Styles

  • Theme name
  • Description
  • Author (recommended)
  • Version
  • License
  • License URI
  • .sticky
  • .bypostauthor
  • .alignleft
  • .alignright
  • .aligncenter
  • .wp-caption
  • .wp-caption-text
  • .gallery-caption

Top ↑

Screenshot

  • Correct size and dimensions (1200×900 preferred)
  • That a screenshot exists

Top ↑

Plugin Territory

  • register_post_type
  • register_taxonomy
  • shortcodes (warning only)

Top ↑

Widgets

  • register_sidebar() anddynamic_sidebar
  • Sidebars registered through widgets_init

Top ↑

  • add_editor_style
  • the_post_thumbnail()
  • sidebar/widget area

Top ↑

Security

Top ↑

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

Last updated: