• About Us
    • New York
  • Work
  • Capabilities
  • Careers
  • Technology
  • Blog
  • Contact Us
  • About Us
    • New York
  • Work
  • Capabilities
  • Careers
  • Technology
  • Blog
  • Contact Us
March 16, 2012

Theme Unit Tests for WordPress Plugin Developers

Posted by Christopher Davis

At it’s core, WordPress is a software designed to make it easy to write content for the web. A plugin developer might add some fancy new features, but often those features come back to the central focus of any website: the content.

If you write a plugin that deals with content in any way, do yourself a favor and have a look at the Theme Unit Test.

What is the Theme Unit Test?

In a nutshell, the theme unit test is a bunch of dummy content, in the form of a WordPress XML export file, that can be loaded into a WordPress installation. It’s purpose is to give theme developers exposure to (1) a bunch of typographical and stylistic elements and (2) all the WordPress generated CSS classes.

Developing a theme is hard work because the end users might not make use of the theme in a way that you envisioned. Maybe you like short post titles, but your users end up using really long titles. Does your theme work okay with long titles? Maybe you never paginate posts, but your users do. Does your theme work with pagination? The theme unit test is meant to help theme developers answer those questions.

How Plugin Developers Can Use the Theme Unit Test

PMG has a WordPress plugin called SEO Auto Linker. As the name implies, the plugin automatically links certain words and phrases in your content to URIs you specify.

Yesterday a new version was released. And it was broken (it’s fixed now! don’t worry). Why? Because I did not test the plugin thoroughly with all types of content. Testing it with the theme unit test data installed on a WP install later on allowed me to identify the issue and fix it; with a few minutes a new, working version was up on the WP.org repo.

If You Deal with Content, Test with Content

Plugin developers often don’t have to worry about the impact their work will have on an end user’s site’s look. If your plugin deals with changing anything on the front end of a WordPress install at all, do your self a favor and install the Theme Unit Test data. Make sure your plugin works with a wide variety of content.

testingtheme unit testunit testswordpress
Previous
Next

Latest White Papers

  • Shifting Plans for 2020 & Beyond
  • Game On: How Brands Can Log Into A Diverse Multi-Billion Dollar Industry
  • What CCPA Means For Brands
  • How Google is Improving Consumer Data Privacy
  • Ways to Prepare for the Cookieless Future
  • See all White Papers

Featured Posts

  • Ad Age Names PMG #1 Best Place to Work in 2021
  • Hindsight 2020 & Looking Ahead to 2021
  • Preparing for Streaming’s Growth & The Future of TV Buying
  • MediaPost Names PMG Independent Agency of the Year
  • PMG Client Portfolio Trends During Amazon Prime Day 2020

Categories

  • Consumer Insights
  • Content
  • Creative Design
  • Data Analytics
  • Development
  • Digital TV & Video
  • Ecommerce
  • Industry News
  • Local
  • Mobile
  • Paid Search
  • PMG Culture
  • Programmatic & Display
  • SEO
  • Social Media
  • Structured Data
Fort Worth

2845 West 7th Street
Fort Worth, TX 76107

Dallas

3102 Oak Lawn Avenue
Suite 650
Dallas, TX 75219

Austin

823 Congress Avenue
Suite 800
Austin, TX 78701

London

33 Broadwick Street
London
W1F 0DQ

New York

120 East 23rd Street
New York, NY 10010

Get in touch

(817) 420 9970
info@pmg.com

Subscribe to the PMG Newsletter
© 2021 PMG Worldwide, LLC, All Rights Reserved
  • Contact
  • Privacy Policy
 Tweet
 Share
 Tweet
 Share
 Tweet
 Share
 LinkedIn
We and our partners use cookies to personalize content, analyze traffic, and deliver ads. By using our website, you agree to the use of cookies as described in our Cookie Policy.