Theme Check Plugin

The following are all the checks that the theme check pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party 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 PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. http://php.net/manual/en/intro-whatis.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 avatarAvatar An avatar is an image or illustration that specifically refers to a character that represents an online user. It’s usually a square box that appears next to the user’s name. 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()
  • sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme./widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. 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