Codex

Theme Development Checklist

Contents

Development & Coding

Header

  • Check for proper DOCTYPE
  • Is there a wp_head() call?
  • <html> tag should include language_attributes()
  • Is there a feed autodiscovery <link>?
  • Are you fetching the title and description using bloginfo()?

Footer

  • Is there a wp_footer() call?

Error Handling

  • Do you have a 404 page?
  • Is your search page helpful? (Navigate to http://yoursite.com/?s=TestSearchOut to test)
  • Are there any PHP or WordPress errors? Add the following debug setting to your wp-config.php file to see deprecated function calls and other WordPress-related errors.
define('DEBUG', true);

Syntax & File Handling

svn

  • If you're using svn, are your files set eol-style:native?
find . -name \*.php -exec svn propset svn:eol-style native {} \;
find . -name \*.css -exec svn propset svn:eol-style native {} \;

JavaScript

  • Is JavaScript CDATA encoded?
<script type="text/javascript">
/* <![CDATA[ */
// content of your Javascript goes here
/* ]]> */
</script>

Formatting, Function, and Logic

  • Are posts in the right order (front page and archive pages)?
  • Are the correct number of posts showing (as set in reading settings)?
  • Are sticky posts styled and functioning correctly?
  • Does the theme have pages tabs in the header? If so, do they overflow or have problems with child pages?

Navigation

  • Do front, archive, and single pages paginate correctly. Do they show the correct number of posts?
  • Posts, pages, and index should include wp_link_pages()

Widgets

  • Is the theme widgetized as fully as possible?
  • Does the theme require custom widgets?
  • Do the current widgets look correct?
  • Are standard widgets setup? Should they be?
  • Do any standard widgets need to be overridden?

Pages

  • Are comments enabled for pages?

Posts

  • Does the page function correctly when logged in as an administrator compared to a normal user? (Example: do "Edit post" links work).
  • Are the date and time format options respected (unless it's important to the design)?
  • Is everything that needs to be styled actually styled?
    • tables
    • captions
    • unordered lists
    • ordered lists
    • blockquotes
      • Make sure quotes are indented and display correctly.
      • If the theme uses a background image or quote symbol, make sure it looks ok on both short and long quotes

Multiple Page Posts

  • Page links are displayed and formatted appropriately
  • Page links work

The more tag

  • Does the part of the post before the more tag display on archive / front pages?
  • Does the full post appear on the permalink page?

Enclosures

  • Do links for enclosures work properly?

Video

  • Do embedded videos look correct?
  • Make sure they don't overlap or push the sidebars down (YouTube videos can be resized with a filter in functions.php, see the "fjords" theme for an example)

Images

  • Check a post with a picture floated right, left, is there enough space around it?
  • Check a post with a picture that is far too big for the content column, does it break the layout? (Perhaps use overflow: hidden;)
  • Is $content_width set?
  • Does the gallery shortcode display properly?

Gravatars

  • Are gravatar calls working properly?

Categories

  • Category links work
  • Categories are displayed ok on front page and permalink page
  • Nested categories should be handled elegantly.

Tags

  • Make sure tag links work.
  • Make sure tags are displayed ok on front page and permalink page.
  • Make sure tags and tag links are shown in each post.

Comments

  • Are comments displayed correctly?
  • Are blockquotes and any applicable HTML styled appropriately?
  • Author comment is highlighted differently
  • User avatars are displayed correctly

(nb: the import feature doesn't maintain comment user id's, so if you've imported to another blog the avatars and author comments won't work - you'll have to post new comments to test this)

No comments

  • No comments are shown.
  • Comment display form is replaced with a message, "Comments Off" or similar.

Disabled Comments

  • Previous comments are still visible.
  • Comment display form is replaced with a message, "Comments Off" or similar.

Trackbacks

  • All trackbacks are shown correctly without overlap.

Comment Form

  • Comment input form looks ok when logged out
  • Comment input form looks ok when logged in
  • Comments have Edit links when logged in as blog administrator
  • Comment HTML is displayed correctly, especially unordered lists and blockquotes.

Theme Classes

Optional bonus points for using the following helpful template tags.

"Theme Unit Tests"

Overview

This section correlates to a WXR file that you can import into a WordPress installation to test your theme. Post titles correlate with section titles below.

Test Procedure:

  1. Download test data: http://svn.automattic.com/wpcom-themes/test-data.2008-12-22.xml
  2. Import test data into your WordPress install. Do this by going to Tools -> Import.
  3. Each "test" is a page or post and relates to the sections below.

Posts

Future Post

  • This post should not show anywhere. It's in the future.

Layout Test

  • Is the post showing a "read more" link? It should.
  • Is the layout correct on every part of the post?

Simple gallery test

  • Does the gallery look correct?
  • Does it look good on front, archive, and single pages?

Category Name Clash

  • Should be in category Foo Parent / Foo A - not in Foo A (no parent).

Test with enclosures

  • Make sure the links work.

Block quotes

  • Make sure the quotes are indented and display correctly
  • If the theme uses a background image or quote symbol, make sure it looks ok on both short and long quotes
  • Likewise for the short and long quotes in comments

Many categories

  • Category links work
  • Categories are displayed ok on front page and permalink page

Many tags

  • Tag links work
  • Tags are displayed ok on front page and permalink page

Tags A and C / Tags B and C / Tags A and B / Tag C / Tag B / Tag A / Tags A, B, C

Raw HTML code

  • All markup is displayed appropriately
  • h1..h6 are consistent
  • tables and lists look ok

Simple markup test

  • All markup is displayed appropriately
  • Text alignment works
  • Image alignment works
  • Block elements should remain blocks, not display:inline (and vice versa)
  • Blockquotes should be indented or otherwise distinct from paragraph text
  • Nested lists should be indented correctly

Embedded video

  • Embedded videos work
  • Make sure they don't overlap or push the sidebars down (YouTube videos can be resized with a filter in functions.php, see the "fjords" theme for an example)

Contributor post, approved

  • The correct author name is displayed

One comment

  • Comment is displayed correctly
  • Comment input form looks ok when logged out
  • Comment input form looks ok when logged in
  • Comments have Edit links when logged in as blog administrator
  • Comment HTML is displayed correctly, especially unordered lists and blockquotes.

No comments

  • No comments are shown
  • Comment display form is replaced with a message, "Comments Off" or similar

Many Trackbacks

  • All trackbacks are shown correctly without overlap

One trackback

  • Trackback is shown correctly without overlapping anything else

Comment test

  • Comments are displayed correctly
  • Author comment is highlighted differently
  • User avatars are displayed correctly

A post with multiple pages

  • Page links are displayed and formatted appropriately
  • Page links work
  • Each page looks ok

An article with a More tag

Cat C / Cat B / Cat A / Cats A and C / Cats B and C / Cats A and B / Cats A, B, C

This post has no body

  • Post should display fine regardless

http://yoursite.com/2007/09/04/14/ ("This post has no title")

Protected: Test with secret password and excerpt / Protected: Test with secret password

  • Password input form should display ok
  • Post should be displayed when the password is entered ("secret")
  • Password entry should work both from the permalink page and the list page http://asdftestblog1.wordpress.com/page/3/

Image align test

  • Images should be aligned left and right without overlap
  • Images shouldn't have a border unless it's part of the design

Test with thumbnails

  • Thumbnails should look ok and not overlap
  • Thumbnails shouldn't have a border unless it's part of the design

Test with wide image resized

  • Image should display ok
  • Shouldn't overlap sidebars

Test with wide image

  • Image should display ok
  • No border unless it's part of the design
  • Sidebar overlap should be handled appropriately (scrolling or or overflow: hidden)
  • Sidebar must not be pushed to the bottom of the page on either the list view or permalink view

Test with image

  • Image should display ok
  • No border unless it's part of the design

Post with categories

  • Categories should display ok

GMT+10 test post / GMT test post / GMT-6 test post / Article in the distant past

  • Timestamps should be correct
  • Date/Time format options should be respected

Draft Post

  • Should not be visible, since it is in draft mode.

Draft post with file attached

  • Should not be visible, since it is in draft mode.
  • Image should be attached.

Contributor post, pending approval

  • Should not be visible.
  • Should say: This post is awaiting review, or similar.

Pages

About / Lorem Ipsum

  • Long and short pages - check that they display ok
  • Comments should be enabled on both
  • Tags and Categories should not be displayed - make sure there isn't a left-over placeholder for them

Page with comments

  • Comments should be enabled
  • Comments should be displayed correctly (see notes above about author comment and avatars)

Page with comments disabled

  • Comments should be disabled
  • There should not be a "comments disabled" message
  • This is a very short page, check that the layout is ok

Parent page / Child page 1 / Child page 2

  • Optional bonus points for displaying the parent and/or child when viewing each of these