Structured and refactored code: There are automated tools available to help you re-factor code, such as phpcpd, but just being careful will get you far. It takes quite little time to continuously re-factor code.
Even if you need to deliver a new feature very fast you can still re-factor its code after delivery. Or in a very pressed situation, at least keep it as a to-do point in the specification/task tracker so that it is not forgotten and so that the client or your seniors can take a decision on when to invest the time needed.
This has a huge impact on big long-term projects. Break down code so that it can easily be re-used. Our ERP and portal is a great example of an extreme case: inexperienced staff had built the old foundation back in 2010 and it took the new team 500 man hours just to understand it, make it run on a new server and clean up the code.
That is 500 hours which could have been completely avoided if the original code would have been well-written.
Format (indentation, consistency, naming, file structure)
Separation of logic and presentation (PHP and HTML)
Fast code: when dealing with large amounts of data a single extra loop could bog down the server entirely.
Comments for complex code (smart consistent naming is the main first step though)
Secure code: one example could be if there checks to prevent one control panel user to access data from another control panel user (by manipulating request variables)
Commit only clean code and required files (set ignore options on non-required files such as form uploaded files etc). Should be possible to do a code review on a committed code. Don’t upload duplicates of libraries for various panels and so on. Commit as few unnecessary lines of code as possible.
Another reason to perfect code is that big high-value clients will want to check code samples of code you have written earlier before hiring us. They will be very selective and require perfection.
So make sure that you can always present the codebase for tough scrutiny by an expert from a prospective client’s team.