A lot of those are corollaries of "Error messages are expensive". (That doesn't mean that you shouldn't put error messages in your code; it means that you should avoid triggering PHP's automatic errors and warnings.)

You can address that in a very general way by, in development and staging, using error_reporting(E_ALL) and reworking your code to avoid whatever messages are generated. Too often, people use error_reporting(0) or @func() calls to just suppress messages, which is a bad idea for performance and a bad idea for debugging.