Severly broken in debug mode – not truely compatible with 4.3
-
This is a great plugin, but it has errors lurking in its code that are not obvious to the typical WordPress installation.
As a developer, I run my development system in Debug mode and on activation, this plugin reports multiple errors and is so bad, it cannot run in Debug mode. None of these problems appear when Debug mode is turned off, but in my opinion, that is no reason to have so many coding errors.
Firstly, the constructor method WP_Widget was deprecated in version 4.3.0, but this plugin is still calling $this->WP_Widget() instead of parent::__constructor().
Secondly, plugin is using deprecated functions: get_settings (deprecated since version 2.1), attribute_escape (deprecated since 2.8) and wp_specialchars (deprecated since 2.8). There maybe more.
Thirdly, non-static method collapsCat::init_textdomain() is being called statically, along with numerous other collapsCat methods.
A cleaner way to set the URL’s for the expand.gif and collapse.gif images is to use plugins_url( ‘img/expand.gif’, __FILE__ ) for example.
Variables and arrays are not initialised with default values, resulting in numerous undefined variable and undefined index errors.
At least one global variable $url is initialised in collapscat.php, but never used for anything and a local version of $url is also initialised in collapsCat(), but not used. The declaration ‘global $collapsCatVersion’ on line 32 in collapscat.php is not necessary – variables declared outside functions are global.
I suggest the plugin developer activate Debug mode and address the errors in this plugin’s code.
drtonyb
- The topic ‘Severly broken in debug mode – not truely compatible with 4.3’ is closed to new replies.