99% product-variations-swatches-for-woocommerce

Code Review | Product Variations Swatches for WooCommerce

WordPress plugin Product Variations Swatches for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: product-variation...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 1, 2020
  • Latest release: Mar 29, 2022
  • Number of updates: 28
  • Update frequency: every 26.0 days
  • Top authors: kimvt1991 (42.86%)mytrinh (42.86%)villatheme (21.43%)

Code review

54 tests

User reviews

52 reviews

Install metrics

20,000+ active / 154,847 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼325.38ms] Passed 4 tests

Analyzing server-side resources used by Product Variations Swatches for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0275.17 ▲5.54
Dashboard /wp-admin3.42 ▲0.0141.12 ▼17.48
Posts /wp-admin/edit.php3.65 ▲0.0148.51 ▼4.00
Add New Post /wp-admin/post-new.php6.89 ▼0.08116.39 ▼1,275.01
Media Library /wp-admin/upload.php3.31 ▲0.0132.72 ▼5.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 79 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Product Variations Swatches for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,871 ▲12316.44 ▲0.719.55 ▲1.073.71 ▲0.58
Dashboard /wp-admin2,964 ▲446.37 ▼0.07208.35 ▼5.86214.15 ▼2.99
Posts /wp-admin/edit.php2,730 ▲123.42 ▲0.0087.59 ▼0.47182.17 ▼1.09
Add New Post /wp-admin/post-new.php1,667 ▼5015.98 ▼3.57581.05 ▼52.67190.57 ▼34.43
Media Library /wp-admin/upload.php1,740 ▲105.73 ▲0.04203.93 ▲13.76248.95 ▲10.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 93% 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
These attributes need your attention: You can take inspiration from this readme.txt

product-variations-swatches-for-woocommerce/product-variations-swatches-for-woocommerce.php 92% from 13 tests

The main file in "Product Variations Swatches for WooCommerce" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 421 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin12,420 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity51.30
▷ Minimum class complexity2.00
▷ Maximum class complexity211.00
Average method complexity6.99
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods910.71%
▷ Public methods7994.05%
▷ Protected methods11.19%
▷ Private methods44.76%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants12100.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
1 PNG file occupies 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/minicolors.png67.02KB34.31KB▼ 48.80%