O'Reilly logo

Professional WordPress® Plugin Development by Justin Tadlock, Brad Williams, Ozh Richard

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

Chapter 16. Debugging and Optimizing

WHAT'S IN THIS CHAPTER?

  • Keeping updated with WordPress

  • Debugging your plugins

  • Logging debug errors

  • Caching data for optimal speed

You can debug and optimize code in many ways. WordPress provides several simple-to-use tools that make plugin developers' lives easier. One of the largest problems in the community is that many plugin developers simply don't use these basic techniques, leaving loads of room for improvement.

Throughout this chapter, you learn how to deal with outdated versions of WordPress, debug issues with your plugins, and cache (store) data for later use. The topics presented in this chapter are all simple features that you can use to make a better plugin.

SUPPORTING OLD VERSIONS (NOT)

As a developer, it's easy to think that you should maintain backward compatibility with older versions of software. It usually makes sense to do this to capture the largest possible audience and please users.

However, the WordPress philosophy on maintaining compatibility with old versions is quite different. In the WordPress development community, backward compatibility may sometimes even be looked down upon. Users are expected to stay updated with the latest version of the software. This philosophy comes down to a few key points.

  • Users are given an "update nag" at the top of their WordPress admin screens, which prompts them to update.

  • There is a multitude of ways to update. Users can even do this with a couple of mouse clicks from their WordPress admin.

  • WordPress ...

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