Chapter 6

Exploring Plugin Development Best Practices

IN THIS CHAPTER

Check Exploring best practices

Check Naming, filing, and locating your plugin

Check Internationalizing your plugin

Starting to develop WordPress plugins is relatively easy. It’s much more difficult to develop WordPress plugins well.

The key to doing development well is sticking with a set of standards that ensures that your plugin is well designed and implemented. A set of standards that many people can agree on is typically referred to as best practices. By adopting best practices as your personal development standard, you ensure that other developers can easily understand your plugin’s structure and code. Doing so makes collaboration much smoother. In other words, if all WordPress plugin developers followed best practices, the WordPress development world would be a happier and more productive place.

This chapter delves deeper into best practices and is dedicated to taking your plugin quality to the next level.

Adding a File Header

The most fundamental best practice when creating WordPress plugins is to ensure that your plugin has a file header at the top of the main plugin file. As discussed in Book 7, Chapter 5, the file ...

Get WordPress All-In-One For Dummies, 4th Edition 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.