Coding best practices

Contrary to the old adage, practice does not always make perfect. Instead, practice makes habit. The more time you spend developing, the more knowledgeable you become, but the benefits or disadvantages of certain development practices may not be obvious to the hobbyist. The wisdom of experienced developers is invaluable as you learn, so here are some general guidelines that should help you make your code easier to design, test, and maintain. You can read through WordPress' coding guidelines (http://codex.wordpress.org/Writing_a_Plugin), but this chapter provides more detailed information—we will be putting these into practice over the following chapters.

Get WordPress 3 Plugin Development Essentials 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.