84% woo-variation-gallery

Code Review | Additional Variation Images Gallery for WooCommerce

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

About plugin

  • Plugin page: woo-variation-gal...
  • Plugin version: 1.3.21
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 11, 2018
  • Latest release: Nov 21, 2023
  • Number of updates: 104
  • Update frequency: every 18.9 days
  • Top authors: EmranAhmed (100%)

Code review

54 tests

User reviews

128 reviews

Install metrics

30,000+ active /762,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.29ms] Passed 4 tests

A check of server-side resources used by Additional Variation Images Gallery for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.22 ▼2.48
Dashboard /wp-admin3.33 ▼0.0145.60 ▼15.77
Posts /wp-admin/edit.php3.45 ▲0.0947.40 ▲0.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.27 ▼19.78
Media Library /wp-admin/upload.php3.26 ▲0.0336.49 ▼3.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 53 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
woo_variation_gallery_do_activate_redirect
woocommerce_show_marketplace_suggestions
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Additional Variation Images Gallery for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3614.31 ▼0.041.63 ▼0.2440.60 ▼4.90
Dashboard /wp-admin2,203 ▲235.60 ▼0.0393.93 ▼3.7044.83 ▼4.67
Posts /wp-admin/edit.php2,111 ▲142.02 ▲0.0237.81 ▼3.1432.76 ▼6.40
Add New Post /wp-admin/post-new.php1,534 ▲823.11 ▼0.05631.57 ▼25.4848.55 ▼1.14
Media Library /wp-admin/upload.php1,408 ▲114.29 ▲0.0894.86 ▼21.3941.22 ▼4.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • woocommerce_show_marketplace_suggestions
    • db_upgraded
    • woo_variation_gallery_do_activate_redirect
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 17× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery-export-import.php
    • > /wp-content/plugins/woo-variation-gallery/includes/slider-template-js.php
    • > /wp-content/plugins/woo-variation-gallery/includes/stylesheet.php
    • > /wp-content/plugins/woo-variation-gallery/includes/html-migrations.php
    • > /wp-content/plugins/woo-variation-gallery/includes/admin-template.php
    • > /wp-content/plugins/woo-variation-gallery/woo-variation-gallery.php
    • > /wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery.php
    • > /wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery-settings.php
    • > /wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery-migrate.php
    • > /wp-content/plugins/woo-variation-gallery/includes/class-woo-variation-gallery-backend.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: additional image, woocommerce variation image gallery, additional variation image, variation images gallery, product variation image...

woo-variation-gallery/woo-variation-gallery.php Passed 13 tests

The primary PHP file in "Additional Variation Images Gallery for WooCommerce" version 1.3.21 is used by WordPress to initiate all plugin functionality
139 characters long description:
Allows inserting multiple images for per variation to let visitors see a different images when WooCommerce product variations are switched.

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
Success! There were no dangerous files found in this plugin11,846 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,0405344,126
PHP281,1265134,015
CSS71792013,687
SVG11013
XML1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.60
▷ Minimum class complexity2.00
▷ Maximum class complexity155.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods238
▷ Static methods3113.03%
▷ Public methods21188.66%
▷ Protected methods2711.34%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.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
No PNG files were detected