78% drawer-sliding

Code Review | Drawer Sliding

WordPress plugin Drawer Sliding scored78%from 54 tests.

About plugin

  • Plugin page: drawer-sliding
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jan 4, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 17
  • Update frequency: every 18.4 days
  • Top authors: chandrakant7389 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼31.03ms] Passed 4 tests

This is a short check of server-side resources used by Drawer Sliding
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2325.04 ▼16.41
Dashboard /wp-admin3.37 ▲0.0627.99 ▼17.62
Posts /wp-admin/edit.php3.45 ▲0.0930.29 ▼17.39
Add New Post /wp-admin/post-new.php3.35 ▼2.5427.65 ▼72.69
Media Library /wp-admin/upload.php3.39 ▲0.1625.99 ▼6.46
Add New /wp-admin/post-new.php?post_type=custom_drawer_post3.3524.66
Drawers /wp-admin/edit.php?post_type=custom_drawer_post3.4231.59

Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Drawer Sliding
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲13313.48 ▼0.888.33 ▲6.5640.63 ▼0.13
Dashboard /wp-admin2,229 ▲655.58 ▼0.0292.65 ▼7.4442.73 ▼1.39
Posts /wp-admin/edit.php2,134 ▲342.03 ▲0.0740.97 ▲4.8635.40 ▼7.36
Add New Post /wp-admin/post-new.php1,556 ▲2823.17 ▲0.05593.36 ▼69.6252.04 ▲3.64
Media Library /wp-admin/upload.php1,431 ▲374.24 ▲0.07100.74 ▲3.5642.87 ▲1.39
Add New /wp-admin/post-new.php?post_type=custom_drawer_post3,2767.64172.3969.76
Drawers /wp-admin/edit.php?post_type=custom_drawer_post1,1141.9533.1428.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=custom_drawer_post
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method CSDPost_Types::cs_post_limit() should not be called statically
    • > GET request to /wp-admin/post-new.php?post_type=custom_drawer_post
    • > Deprecated in wp-includes/class-wp-hook.php+312
    Non-static method CSDPost_Types::add_meta_box() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=custom_drawer_post
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
    • > GET request to /wp-admin/post-new.php?post_type=custom_drawer_post
    • > Deprecated in wp-admin/includes/template.php+1443
    Non-static method CSDPost_Types::render_drawer_setting_meta_box() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=custom_drawer_post
    • > Warning in wp-content/plugins/drawer-sliding/includes/class-drawer-sliding-type.php+790
    in_array() expects parameter 2 to be array, bool given
    • > GET request to /wp-admin/edit.php?post_type=custom_drawer_post
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method CSDPost_Types::set_custom_class_name_columns() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/drawer-sliding/public/drawer_type/class-drawer-type-content.php:2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/drawer-sliding/includes/class-drawer-cart.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/drawer-sliding/public/drawer_type/class-drawer-type-menu.php:2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/drawer-sliding/public/drawer_type/class-drawer-type-cart.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/drawer-sliding/public/drawer_type/class-drawer-type-cart.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/drawer-sliding/includes/class-drawer-cart.php:4
    • > PHP Notice
      Undefined variable: custom_drawer_post_data in wp-content/plugins/drawer-sliding/public/drawer_type/class-drawer-type-cart.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in drawer-sliding/assets to your readme.txt
The official readme.txt is a good inspiration

drawer-sliding/drawer-sliding.php 92% from 13 tests

The entry point to "Drawer Sliding" version 1.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,478 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP153105101,679
CSS3250371,312
JavaScript310372350
SVG303137

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity16.12
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods513.89%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/open_square.png1.14KB0.82KB▼ 28.75%
img/open_box.png0.59KB0.23KB▼ 60.57%
img/open_red.png1.55KB0.82KB▼ 47.35%
img/close.png0.77KB0.31KB▼ 58.93%