In coding tutorials, much is often left out in order not to be too verbose, to keep the complexity down or because it feels over engineering to follow through with the examples. I will give a full structural suggestion based on my experience that can be applied directly, regardless of the project size.
Mutation testing can give your tests that extra confidence level not achieved simply by measuring code test coverage.
TDD is synonymous with writing tests first and implementations later. I want to challenge that approach as a catch-all do-all approach.
I like structure in my code and over a period of 5-10 years, tooling in PHP has improved immensely to improve the structure and readability of code. However, it cannot stand alone and should not be used for measuring goals.
When using an abstraction layer for communicating with e.g. a database, it is helpful to keep in mind, how things work underneath the surface.