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 ...

Get Professional WordPress® Plugin Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.