Testing WordPress

Write better WordPress Themes and Plugins

Learn well tested and proven techniques to improve the quality of your WordPress code

Have you ever felt slowed down by bad code but didn't have the time to fix it? Have you ever hesitated to clean up badly written code because you're afraid it might break? Ever came back to a WordPress project a few months later just to realize you don't understand how your own code works?

Did you ever ask yourself what to do about it and how to get started. Preferably yesterday!

To create better code, there are lots of tools around like PHPUnit, PHP Mess detector, WP_Mock and Travis-CI that can help us out. There are also numerous of principles,rules of thumbs and metrics to understand.

But it turns out that the first few steps into the world writing good clean and testable software are hard. This book is dedicated to give You a helping hand to get started with writing high quality, testable and reusable code with a clear focus on WordPress.

Testing WordPress cover

In this book, I take well known concepts of software engineering and put them in a WordPress context with real world examples to show you:

  • How to write testable PHP code for WordPress
  • How to use tools and libraries like PHPUnit and WP_Mock to test your code
  • How use static code analysis tools like PHP CodeSniffer to improve your code
  • How to use quality metrics like the CRAP index to find code that needs improvement
  • Examples of how to use PHPUnit and WP_Mock in real world WordPress plugins
  • How to setup your WordPress project in a Continuous Integration tool like Travis-CI

Yes! Send updates about this book to my email!

As this book takes form, we'll be sending out updates, early bird specials and sample chapters along the way. Submit your email address below to stay in the_loop.

About the author

Erik Torsner

Hi, I'm @eriktorsner, full time developer for  20(!) years. The past 4-5 years with a solid focus on the WordPress eco system.Creator of wp-checksum and Integrity Checker. I've written about software testing for Load Impact and Rackspace and about WordPress here at WordPress Essentials.