Chapter 6: Exploring Plugin Development Best Practices

In This Chapter

arrow.png Exploring best practices

arrow.png Naming, filing, and locating your plugin

arrow.png 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 to stick with a set of standards that ensures that your plugin is well designed and implemented. A set of standards that many people can agree upon are typically referred to as best practices. By adopting best practices as your own 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 Chapter 5 of this minibook, ...

Get WordPress All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.