On the TutsPlus.com site there's a tutorial posted about using PHP CodeSniffer with WordPress, a popular PHP coding standards tool that helps enforce common coding practices and style in your application.
Oftentimes, the way in which we write code depends on how we got started with programming. [...] In this article, we're going to take an introductory look at code smells. We're going to examine what they are, what they look like, and how they often manifest themselves in the work we do. We'll be using PHP for our examples.
They start with an introduction to the topic of "code smells" including a few examples along with matching code snippets:
- Example 1: Clear Naming Conventions
- Example 2: Stay DRY
- Example 3: Long Parameter Lists
They also include some solutions that can help you avoid these "smells" in your code and refactor out ones that might already exist.