Skip to content

Educational code examples for "Who Needs Code Quality Anyway?" - A WordPress-focused talk demonstrating common bad practices and their improved alternatives. Covers modern PHP, security, architecture, error handling, and documentation best practices.

Notifications You must be signed in to change notification settings

apermo/code-quality-talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Who Needs Code Quality Anyway? A WordPress Perspective

This repository contains code examples for the talk "Who Needs Code Quality Anyway? A WordPress Perspective" - demonstrating common bad practices in WordPress development and their improved alternatives.

Talk Summary

Think you don't need coding standards, documentation, or tests? Perfect! In this tongue-in-cheek session, I'll show you why you're right… and then why you're absolutely, hilariously wrong.

We'll dive into what PHP 7 & 8 offer, examine how design patterns and best practices affect WordPress projects, and look at the real-world impact of skipping (or following) good coding habits.

Expect surprises, laughs, and practical insights to take your code from "barely works" to "built to last." You might just leave loving code quality after all.

Learning Outcomes

  • Get familiar with modern PHP features in a WordPress context
  • Understand the business case for (and against!) coding standards
  • Learn how small changes in code quality pay off in big ways

About Me

Christoph Daum is a WordPress and PHP specialist, with over 25 years of experience in web development. He started first web projects in the late 90s, some of which are still leading in their field. As technical lead on multiple projects with millions page impressions per month, his responsibilities included theme and plugin development, performance optimizations, and feature planning. Christoph is a contributor to the WordPress ecosystem, host and founder of his local WordPress Meetup in Dortmund, and a frequent speaker at meetups and WordCamps.

Where This Talk Has Been Presented

WordCamp Netherlands 2025

  • Event: WordCamp Netherlands 2025
  • Date: November 27-28, 2025
  • Location: Den Haag, The Netherlands
  • Talk Date & Time: November 27, 2025 at 14:45 (Track 2)
  • Session Details: View on WordCamp.org
  • Slides: Coming soon
  • Recording: Will be available on WordPress.tv

Repository Structure

This repository contains a series of examples, of which each demonstrates a specific issues, not all will be covered in the talk due to time limitations. The examples are grouped into the following categories:

1. Code Quality

Essential practices for maintainable code

2. Modern PHP

Foundation concepts for modern WordPress development

3. Architecture

Designing scalable and maintainable systems

4. Error Handling

Graceful failure and debugging strategies

5. Security

Protecting your WordPress applications

6. Documentation

Communicating through code and comments

How to Use This Repository

Each example folder contains:

  • bad.php - Demonstrates the bad practice
  • good.php - Shows the improved approach
  • README.md - Explanation of the issue and solution

Some examples also include:

  • bad-real.php / better-real.php - Real-world examples from WordPress core
  • OVERVIEW.md - Additional overview or context

These examples are designed for educational purposes, demonstrating common pitfalls in WordPress development and how to avoid them.

Note

None of the code examples in this repository are meant to be used as-is in production environments. They are simplified snippets to illustrate specific points about code quality and best practices. None of the examples have been tested for security, performance, or compatibility. Always review and adapt code to fit your specific project requirements and standards.

For educational purposes multiple classes are used in the same file, which is not a recommended practice for production code and is only done to keep the examples compact and easy to follow.

The examples have been created for educational purposes with the help of Claude Sonnet 4.5 and been reviewed manually.

Contributing

Contributions are welcome! If you have suggestions for additional examples or improvements to existing ones, please open an issue or submit a pull request.

License

This project is licensed under the GNU General Public License v2.0 - the same license as WordPress itself.

About

Educational code examples for "Who Needs Code Quality Anyway?" - A WordPress-focused talk demonstrating common bad practices and their improved alternatives. Covers modern PHP, security, architecture, error handling, and documentation best practices.

Topics

Resources

Stars

Watchers

Forks