To build a foolproof and super easy to maintain system must be a goal for a system development.
To get to that, it has to have
- clear naming standard and convention. e.g. no $i or $anumber kind of variable
- clear and easy to read code structure
- many small and structured files over one huge file
- heavily tested before deploy to live server and start being used by the users
- good database design to cater for growth
- good settings and configurations either on files or database so it is flexible