84% woo-variation-swatches

Code Review | Variation Swatches for WooCommerce

WordPress plugin Variation Swatches for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-variation-swa...
  • Plugin version: 2.0.29
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 166
  • Update frequency: every 13.0 days
  • Top authors: EmranAhmed (100%)

Code review

54 tests

User reviews

782 reviews

Install metrics

300,000+ active /6,752,913 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.53ms] Passed 4 tests

This is a short check of server-side resources used by Variation Swatches for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.98 ▼3.87
Dashboard /wp-admin3.35 ▲0.0550.66 ▲0.50
Posts /wp-admin/edit.php3.47 ▲0.1147.69 ▼3.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.48 ▼3.61
Media Library /wp-admin/upload.php3.28 ▲0.0437.41 ▲4.67

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Variation Swatches for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1114.67 ▲0.431.80 ▼0.0841.04 ▼10.09
Dashboard /wp-admin2,206 ▲325.56 ▼0.0893.76 ▼10.5140.34 ▼7.15
Posts /wp-admin/edit.php2,108 ▲81.95 ▼0.0040.41 ▼2.0738.85 ▲4.04
Add New Post /wp-admin/post-new.php1,534 ▲823.36 ▲0.34677.86 ▼3.9259.31 ▲6.72
Media Library /wp-admin/upload.php1,411 ▲144.16 ▼0.10100.17 ▲1.0545.31 ▲3.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 12× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/woo-variation-swatches/includes/html-settings-group.php
    • > /wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-export-import.php
    • > /wp-content/plugins/woo-variation-swatches/includes/getwooplugins/html/dialog.php
    • > /wp-content/plugins/woo-variation-swatches/uninstall.php
    • > /wp-content/plugins/woo-variation-swatches/includes/html-product-settings-panel.php
    • > /wp-content/plugins/woo-variation-swatches/includes/getwooplugins/html/settings-page.php
    • > /wp-content/plugins/woo-variation-swatches/includes/html-settings-tutorial.php
    • > /wp-content/plugins/woo-variation-swatches/includes/html-settings-sidebar.php
    • > /wp-content/plugins/woo-variation-swatches/includes/class-woo-variation-swatches-term-meta.php
    • > /wp-content/plugins/woo-variation-swatches/includes/themes-support.php

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

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

The primary PHP file in "Variation Swatches for WooCommerce" version 2.0.29 is used by WordPress to initiate all plugin functionality
117 characters long description:
Beautiful colors, images and buttons variation swatches for woocommerce product attributes. Requires WooCommerce 5.6+

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin10,064 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,4834495,143
JavaScript115967132,903
CSS5198972,018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.11
▷ Minimum class complexity2.00
▷ Maximum class complexity157.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods344
▷ Static methods3610.47%
▷ Public methods29686.05%
▷ Protected methods4312.50%
▷ Private methods51.45%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/placeholder.png0.38KB0.43KB0.00%