O'Reilly logo

WordPress 3 Plugin Development Essentials by Everett Griffiths, Brian Bondari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing test results in the database

Another option to help reduce the overhead caused by slow tests is to store test results in the database. Each time a page is requested, you would pull up a specific record from the wp_options table where you stored the results of the last test. Based on the result, you could decide whether or not you needed to run tests again. Querying the database does incur some overhead, but it may be significantly less overhead than running through an entire gauntlet of testing functions.

There are many different options available to you when choosing how to test your plugin. The requirements really vary depending on the nature of the code you have used, but we've given you a good starting toolbox for how to test for some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required