84% woo-product-variation-gallery

Code Review | Variation Images Gallery for WooCommerce

WordPress plugin Variation Images Gallery for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-product-varia...
  • Plugin version: 2.3.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 69
  • Update frequency: every 26.4 days
  • Top authors: techlabpro1 (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

8,000+ active /132,663 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.46MB] [CPU: ▲0.83ms] Passed 4 tests

Analyzing server-side resources used by Variation Images Gallery for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1836.68 ▼1.39
Dashboard /wp-admin3.90 ▲0.5948.92 ▼4.92
Posts /wp-admin/edit.php3.95 ▲0.5955.97 ▲8.05
Add New Post /wp-admin/post-new.php6.41 ▲0.5384.24 ▲2.28
Media Library /wp-admin/upload.php3.76 ▲0.5338.90 ▲7.36

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

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

Browser metrics Passed 4 tests

Variation Images Gallery for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8814.73 ▲0.381.69 ▼0.0138.06 ▼5.31
Dashboard /wp-admin2,252 ▲775.68 ▲0.0396.07 ▼22.7587.43 ▲45.49
Posts /wp-admin/edit.php2,164 ▲612.10 ▲0.1442.21 ▼2.9038.20 ▼2.81
Add New Post /wp-admin/post-new.php1,655 ▲12923.26 ▼0.15596.04 ▼33.44164.47 ▲117.92
Media Library /wp-admin/upload.php1,457 ▲604.12 ▼0.0798.00 ▼7.8391.34 ▲48.68

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • RTWPVG_VERSION
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-product-variation-gallery/app/WooProductVariationGallery.php
    • > /wp-content/plugins/woo-product-variation-gallery/uninstall.php
    • > /wp-content/plugins/woo-product-variation-gallery/woo-product-variation-gallery.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

woo-product-variation-gallery/woo-product-variation-gallery.php 92% from 13 tests

The entry point to "Variation Images Gallery for WooCommerce" version 2.3.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin8,706 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript109894103,863
PHP276647513,259
CSS676141,540
SVG31039
JSON1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity30.20
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods169
▷ Static methods6035.50%
▷ Public methods15893.49%
▷ Protected methods10.59%
▷ Private methods105.92%
Functions22
▷ Named functions14.55%
▷ Anonymous functions2195.45%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rtwpvs-pro.png39.92KB15.71KB▼ 60.66%
assets/images/video-play.png2.53KB2.74KB0.00%
assets/images/rtwpvg-pro.png28.85KB12.85KB▼ 55.45%