Concepts from a client project that taught us a lot about the dashboard. WordPress rewards developers who work with its APIs instead of around them. Almost every problem we have debugged in client projects started with a shortcut that bypassed a core function.
What the screens show
Register things on the right hook, pass complete arguments, and let core handle the rest. It is more typing up front, but the result survives updates and plays nicely with other plugins.
We will revisit this in six months with fresh numbers. If the results change, we will update the post and note what changed at the end.
If you try this on your own project, start with one page or one service rather than the whole codebase. A small experiment gives you real numbers to argue with, and it is easy to roll back if the idea does not fit.
We have been running this approach for several months now. The initial setup took about a day, and the ongoing cost is close to zero once the team knows where to look.
None of this is new, and that is the point. The techniques that last are usually the boring ones that are documented well and supported by the platform itself.
As always, the examples are simplified to fit on a page. The production version has more error handling and logging, but the shape of the code is the same.
What we would change next time
None of this is new, and that is the point. The techniques that last are usually the boring ones that are documented well and supported by the platform itself.
- Check capabilities before doing anything.
- Verify a nonce on every state-changing request.
- Sanitise input and escape output, always.
- Script test sites with WP-CLI.
We tried something similar in 2023 and rolled it back. Curious whether the tooling has caught up since.
Thanks for including the numbers. So many posts skip the measurement part.
Would this still apply on shared hosting without shell access?