General PHP code especially beneficial for optimising externally built php sites