wp debug mode errors, warnings fixes for plugin