64% woo-category-slider-grid

Code Review | Category Slider for WooCommerce

WordPress plugin Category Slider for WooCommerce scored64%from 54 tests.

About plugin

  • Plugin page: woo-category-slid...
  • Plugin version: 1.4.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Oct 30, 2023
  • Number of updates: 86
  • Update frequency: every 26.2 days
  • Top authors: shapedplugin (58.14%)wplimb (26.74%)rubel_miah (10.47%)Shamimmiashuhagh (8.14%)

Code review

54 tests

User reviews

78 reviews

Install metrics

9,000+ active /145,710 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.30MB] [CPU: ▲6.92ms] Passed 4 tests

Analyzing server-side resources used by Category Slider for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.94 ▲1.4854.31 ▲12.88
Dashboard /wp-admin4.60 ▲1.2955.52 ▲2.20
Posts /wp-admin/edit.php4.69 ▲1.3358.08 ▲11.78
Add New Post /wp-admin/post-new.php7.13 ▲1.2494.12 ▲5.31
Media Library /wp-admin/upload.php4.57 ▲1.3444.46 ▲8.40
Settings /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_settings5.0250.22
Add New /wp-admin/post-new.php?post_type=sp_wcslider5.2076.23
Tools /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_tools5.0250.38
Manage Sliders /wp-admin/edit.php?post_type=sp_wcslider5.1058.13
Help /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_help5.0250.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 166 new files
Database: no new tables, 13 new options
New WordPress options
sp_wcsp_settings
widget_woo_category_slider_widget
widget_recent-comments
woo_category_slider_version
widget_recent-posts
woo_category_slider_first_version
woo_category_slider_db_version
sp_woo_category_slider_review_notice_dismiss
widget_theysaidso_widget
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Category Slider for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15314.36 ▼0.291.76 ▲0.0733.82 ▼9.37
Dashboard /wp-admin2,296 ▲1165.54 ▲0.0086.72 ▼10.0443.14 ▲0.17
Posts /wp-admin/edit.php2,210 ▲1102.06 ▲0.0541.57 ▲4.8537.69 ▼1.49
Add New Post /wp-admin/post-new.php6,255 ▲4,72919.33 ▼3.741,078.37 ▲353.1456.98 ▲3.83
Media Library /wp-admin/upload.php1,507 ▲1074.20 ▲0.0197.55 ▼6.3045.27 ▼0.10
Settings /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_settings1,3933.6165.2945.75
Add New /wp-admin/post-new.php?post_type=sp_wcslider6,2385.15103.19154.67
Tools /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_tools1,3383.8252.4973.28
Manage Sliders /wp-admin/edit.php?post_type=sp_wcslider1,4704.0660.0194.22
Help /wp-admin/edit.php?post_type=sp_wcslider&page=wcsp_help2,08814.42297.70135.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/woo-category-slider-grid/woo-category-slider-grid.php+295
    Cannot redeclare run_woo_category_slider() (previously declared in wp-content/plugins/woo-category-slider-grid/woo-category-slider-grid.php:297)
  • This plugin has failed uninstalling correctly, leaving 166 files (2.63MB) in the plugin directory
    • (new file) admin/GutenbergBlock/build/index.js
    • (new file) admin/class-woo-category-slider-admin.php
    • (new file) admin/class-woo-category-slider-element-shortcode-addons.php
    • (new file) admin/class-woo-category-slider-element-shortcode-addons-deprecated.php
    • (new file) admin/ElementAddons_Deprecated/Sp_Category_Shortcode_Widget_Deprecated.php
    • (new file) admin/class-category-slider-gutenberg-block.php
    • (new file) admin/GutenbergBlock/class-woo-category-slider-shortcode-init.php
    • (new file) admin/ElementAddons/Sp_Category_Shortcode_Widget.php
    • (new file) admin/GutenbergBlock/assets/wcs-block-preview.svg
    • (new file) admin/GutenbergBlock/build/index.asset.php
    • ...
  • This plugin does not fully uninstall, leaving 14 options in the database
    • widget_woo_category_slider_widget
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • sp_woo_category_slider_review_notice_dismiss
    • woo_category_slider_db_version
    • woo_category_slider_first_version
    • can_compress_scripts
    • widget_recent-comments
    • sp_wcsp_settings
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-category-slider-grid/admin/class-woo-category-slider-element-shortcode-addons.php:143
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-category-slider-grid/admin/partials/notices/review.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/woo-category-slider-grid/admin/ElementAddons/Sp_Category_Shortcode_Widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/woo-category-slider-grid/includes/updates/update-1.4.15.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-category-slider-grid/admin/class-woo-category-slider-element-shortcode-addons-deprecated.php:141
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/woo-category-slider-grid/admin/ElementAddons_Deprecated/Sp_Category_Shortcode_Widget_Deprecated.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-category-slider-grid/public/dynamic-style.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/woo-category-slider-grid/includes/updates/update-1.2.1.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-category-slider-grid/admin/preview/class-woo-category-slider-preview.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can take inspiration from this readme.txt

woo-category-slider-grid/woo-category-slider-grid.php 92% from 13 tests

The main PHP script in "Category Slider for WooCommerce" version 1.4.18 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 305 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
There were no executable files found in this plugin25,386 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript132,22849710,935
PHP801,5683,5386,925
CSS157064804,601
SVG35052,925

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity16.78
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes00.00%
Methods242
▷ Static methods4116.94%
▷ Public methods23195.45%
▷ Protected methods41.65%
▷ Private methods72.89%
Functions23
▷ Named functions2191.30%
▷ Anonymous functions28.70%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/wcs-badge-icon.png26.08KB4.98KB▼ 80.92%
admin/partials/wcsp-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%