Using the mediator pattern to untangle WordPress plugin code
A tangled inventory plugin had hooks and direct class calls everywhere. Treating the WordPress Plugin API as the mediator, with hooks in a dedicated subscriber class, keeps the core logic clean and testable.