84% woo-product-gallery-slider

Code Review | Product Gallery Slider for WooCommerce

WordPress plugin Product Gallery Slider for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: woo-product-galle...
  • Plugin version: 2.2.12
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Sep 17, 2023
  • Number of updates: 104
  • Update frequency: every 27.7 days
  • Top authors: im_niloy (100%)

Code review

54 tests

User reviews

103 reviews

Install metrics

20,000+ active / 386,291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.77MB] [CPU: ▲8.10ms] Passed 4 tests

Server-side resources used by Product Gallery Slider for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.23 ▲1.7750.71 ▼3.03
Dashboard /wp-admin5.07 ▲1.7758.42 ▲7.35
Posts /wp-admin/edit.php5.18 ▲1.8366.95 ▲17.86
Add New Post /wp-admin/post-new.php7.67 ▲1.78103.81 ▲10.20
Media Library /wp-admin/upload.php4.99 ▲1.7654.94 ▲19.11

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 235 new files
Database: no new tables, 7 new options
New WordPress options
ciwpgs_installed
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Product Gallery Slider for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.25 ▼1.501.57 ▼0.7839.41 ▼19.18
Dashboard /wp-admin2,257 ▲724.94 ▲0.06113.79 ▼5.9444.50 ▼0.73
Posts /wp-admin/edit.php2,144 ▲552.08 ▲0.0736.95 ▲0.3634.39 ▼2.92
Add New Post /wp-admin/post-new.php1,563 ▲3023.42 ▲0.07673.15 ▲15.7458.37 ▲5.24
Media Library /wp-admin/upload.php1,439 ▲544.26 ▲0.11100.60 ▼5.9243.17 ▲0.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • ciwpgs_installed
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Fields' not found in wp-content/plugins/woo-product-gallery-slider/includes/class-image-sizes.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-gallery-slider/includes/core.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-product-gallery-slider/includes/functions.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-product-gallery-slider/includes/functions.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: product gallery slider, woocommerce product gallery carousel, woocommerce product gallery slider, woocommerce product image slider

woo-product-gallery-slider/woo-product-gallery-slider.php 85% from 13 tests

The main PHP file in "Product Gallery Slider for WooCommerce" ver. 2.2.12 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "3.9")
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin43,879 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1124,3843,03418,638
JavaScript111,3445266,685
PO File203,1983,5916,500
Sass1797435,705
CSS94485265,493
HTML1344413
JSON620285
XML161195
SVG51365

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity25.78
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity5.40
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes78
▷ Abstract classes22.56%
▷ Concrete classes7697.44%
▷ Final classes22.63%
Methods442
▷ Static methods7015.84%
▷ Public methods38887.78%
▷ Protected methods194.30%
▷ Private methods357.92%
Functions36
▷ Named functions3186.11%
▷ Anonymous functions513.89%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/zoom-glass.png5.71KB1.55KB▼ 72.86%
assets/img/icon-right-bold.png1.74KB0.29KB▼ 83.34%
assets/img/none.png5.98KB1.05KB▼ 82.44%
assets/img/border.png17.94KB5.86KB▼ 67.31%
assets/img/icon-right.png2.20KB0.57KB▼ 74.11%