Improve object oriented syntax. Fix Strict standard error when installing the plugin

PHP better object oriented syntax. Fix Strict standard error