63% gallery-slider-for-woocommerce

Code Review | Product Gallery Slider and Additional Variation Images Gallery for WooCommerce

WordPress plugin Product Gallery Slider and Additional Variation Images Gallery for WooCommerce scored 63% from 54 tests.

About plugin

  • Plugin page: gallery-slider-fo...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.8.1
  • First release: Jan 1, 2021
  • Latest release: Feb 9, 2022
  • Number of updates: 23
  • Update frequency: every 17.7 days
  • Top authors: shapedplugin (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

4,000+ active / 28,195 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼174.76ms] Passed 4 tests

Server-side resources used by Product Gallery Slider and Additional Variation Images Gallery for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0125.21 ▲2.51
Dashboard /wp-admin3.06 ▼0.0030.90 ▼6.58
Posts /wp-admin/edit.php3.11 ▲0.0133.95 ▲2.70
Add New Post /wp-admin/post-new.php5.42 ▼0.0169.47 ▼693.65
Media Library /wp-admin/upload.php3.01 ▲0.0022.18 ▼1.33

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 144 new files
Database: no new tables, 4 new options
New WordPress options
woo_gallery_slider_db_version
woo_gallery_slider_first_version
woo_gallery_slider_activation_date
woo_gallery_slider_version

Browser metrics Passed 4 tests

Checking browser requirements for Product Gallery Slider and Additional Variation Images Gallery for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8015.62 ▼0.014.93 ▼1.5777.66 ▼5.45
Dashboard /wp-admin2,942 ▲466.10 ▼0.05118.25 ▼13.62168.00 ▼3.22
Posts /wp-admin/edit.php2,755 ▲153.23 ▼0.0063.73 ▲1.69138.68 ▲3.44
Add New Post /wp-admin/post-new.php3,751 ▲4519.04 ▲0.18430.13 ▼15.45164.79 ▲1.22
Media Library /wp-admin/upload.php1,767 ▲155.52 ▼0.03143.75 ▲4.87185.30 ▼4.02

Uninstaller [IO: ▲3.32MB] [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
    • > Error in wp-content/plugins/gallery-slider-for-woocommerce/woo-gallery-slider.php+55
    Cannot redeclare run_woo_gallery_slider() (previously declared in wp-content/plugins/gallery-slider-for-woocommerce/woo-gallery-slider.php:55)
  • The plugin did not uninstall successfully, leaving 144 files (3.32MB) in the plugin directory
    • (new file) admin/fonts/FontAwesome.otf
    • (new file) admin/css/notices.min.css
    • (new file) admin/css/notices.css
    • (new file) admin/fonts/fontawesome-webfont.eot
    • (new file) admin/css/woo-gallery-slider-admin.css
    • (new file) admin/css/woo-gallery-slider-admin.min.css
    • (new file) admin/css/font-awesome5.min.css
    • (new file) README.txt
    • (new file) admin/css/font-awesome.min.css
    • (new file) admin/class-woo-gallery-slider-admin.php
    • ...
  • Zombie WordPress options were found after uninstall: 5 options
    • woo_gallery_slider_version
    • woo_gallery_slider_first_version
    • woo_gallery_slider_activation_date
    • recovery_mode_email_last_sent
    • woo_gallery_slider_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gallery-slider-for-woocommerce/public/partials/product-images.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/gallery-slider-for-woocommerce/includes/updates/update-1.0.0.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-slider-for-woocommerce/admin/partials/notices/review.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WCGS_Public_Settings' not found in wp-content/plugins/gallery-slider-for-woocommerce/public/partials/class/class-public-style.php:12
    • > PHP Fatal error
      Trait 'WCGS_Public_Default' not found in wp-content/plugins/gallery-slider-for-woocommerce/public/partials/class/class-public-settings.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt might help

gallery-slider-for-woocommerce/woo-gallery-slider.php 77% from 13 tests

The main PHP script in "Product Gallery Slider and Additional Variation Images Gallery for WooCommerce" version 1.1.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.3" instead of "4.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 323 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gallery-slider-for-woocommerce.php" instead of "woo-gallery-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected18,895 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,6613205,820
CSS154875355,228
PHP499802,0743,944
SVG8022,857
Sass214141,046

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits2
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods139
▷ Static methods2316.55%
▷ Public methods13194.24%
▷ Protected methods00.00%
▷ Private methods85.76%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
20 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/play-button-square.png4.48KB1.62KB▼ 63.89%
public/images/play-button-round.png1.39KB0.71KB▼ 48.77%
admin/img/hide_thumb.png1.26KB0.25KB▼ 80.23%
admin/img/admin-settings-logo.png1.42KB1.19KB▼ 16.33%
public/images/not_loaded.png0.84KB0.63KB▼ 24.48%