Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.56MB] [CPU: ▲4.02ms] Passed 4 tests
Server-side resources used by Variation Swatches for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 41.73 ▲1.03 |
Dashboard /wp-admin | 4.01 ▲0.70 | 53.55 ▲3.47 |
Posts /wp-admin/edit.php | 4.06 ▲0.70 | 50.65 ▲6.32 |
Add New Post /wp-admin/post-new.php | 6.53 ▲0.64 | 98.26 ▲15.28 |
Media Library /wp-admin/upload.php | 3.92 ▲0.69 | 38.85 ▲5.27 |
Server storage [IO: ▲0.56MB] [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: 53 new files
Database: no new tables, 8 new options
New WordPress options |
---|
can_compress_scripts |
rtwpvs_pro_activate |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
rtwpvs_pro_version |
db_upgraded |
Browser metrics Passed 4 tests
Variation Swatches for WooCommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,850 ▲88 | 14.62 ▼0.10 | 1.99 ▲0.33 | 43.72 ▼4.02 |
Dashboard /wp-admin | 2,240 ▲66 | 5.55 ▼0.08 | 87.87 ▼11.16 | 88.26 ▲41.78 |
Posts /wp-admin/edit.php | 2,164 ▲64 | 2.10 ▲0.08 | 42.29 ▲0.49 | 37.34 ▲2.87 |
Add New Post /wp-admin/post-new.php | 1,664 ▲138 | 25.60 ▲2.65 | 594.28 ▼107.25 | 96.27 ▲38.43 |
Media Library /wp-admin/upload.php | 1,457 ▲60 | 4.21 ▲0.02 | 102.81 ▼15.93 | 80.58 ▲33.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- rtwpvs_pro_version
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/woo-product-variation-swatches/uninstall.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-product-variation-swatches/woo-product-variation-swatches.php:28
- > PHP Fatal error
require_once(): Failed opening required 'RTWPVS_PLUGIN_PATHvendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-product-variation-swatches/app/WooProductVariationSwatches.php on line 16
- > PHP Warning
Use of undefined constant RTWPVS_PLUGIN_PATH - assumed 'RTWPVS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-variation-swatches/app/WooProductVariationSwatches.php on line 16
- > PHP Warning
require_once(RTWPVS_PLUGIN_PATHvendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/woo-product-variation-swatches/app/WooProductVariationSwatches.php on line 16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 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
8 plugin tags: woocommerce, product attributes, woocommerce attributes, variable product attributes, woocommerce variation swatches...
woo-product-variation-swatches/woo-product-variation-swatches.php 85% from 13 tests
Analyzing the main PHP file in "Variation Swatches for WooCommerce" version 2.3.12
Please take the time to fix the following:
- Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.8")
- Text Domain: Please use dashes and lowercase characters for text domains
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin6,750 lines of code in 45 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 29 | 866 | 442 | 4,306 |
JavaScript | 8 | 55 | 204 | 1,463 |
CSS | 6 | 47 | 2 | 951 |
SVG | 1 | 0 | 0 | 25 |
JSON | 1 | 0 | 0 | 5 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 34.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 190.00 |
Average method complexity | 4.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 21 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 21 | 100.00% |
▷ Final classes | 1 | 4.76% |
Methods | 208 | |
▷ Static methods | 107 | 51.44% |
▷ Public methods | 182 | 87.50% |
▷ Protected methods | 1 | 0.48% |
▷ Private methods | 25 | 12.02% |
Functions | 37 | |
▷ Named functions | 1 | 2.70% |
▷ Anonymous functions | 36 | 97.30% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/placeholder.png | 2.75KB | 2.92KB | 0.00% |
assets/images/rtwpvs-pro.png | 39.92KB | 15.71KB | ▼ 60.66% |
assets/images/icon-128x128.png | 10.51KB | 4.61KB | ▼ 56.09% |
assets/images/rtwpvg-pro.png | 28.85KB | 12.85KB | ▼ 55.45% |