Theme Check Plugin

The following are all the checks that the theme check plugin performs. All of these are required items, all themes have to pass this plugin before they can even be reviewed.

You can get the plugin from the repo or you can get the developer version on Github.

Admin menu Admin menu

  • Check for levels deprecated in 2.0 in creating menus.
  • Check for add_admin_page

Top ↑

Check for bad things 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 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 CDN

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

Top ↑

Constants Constants

Top ↑

General General

  • $content_width

Top ↑

Customization Customization

  • add_setting sanitization callback
  • Sanization callbacks

Top ↑

Deprecation checks 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 Line endings

  • DOS or UNIX style line endings

Top ↑

Additional checks Additional checks

  • .git
  • .svn
  • File checks: https://github.com/Otto42/theme-check/blob/master/checks/filenames.php#L21
  • 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 Text domain

  • If one exists
  • Matches theme slug

Top ↑

Styles Styles

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

Top ↑

Screenshot Screenshot

  • Correct size and dimensions (880 x 660 preferred)
  • That a screenshot exists

Top ↑

Plugin Territory Plugin Territory

  • register_post_type
  • register_taxonomy
  • shortcodes (warning only)

Top ↑

Widgets Widgets

  • register_sidebar() anddynamic_sidebar
  • Sidebars registered through widgets_init

Top ↑

  • add_editor_style
  • the_post_thumbnail()
  • sidebar/widget area

Top ↑

Security Security

Top ↑

Info 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