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.31MB] [CPU: ▼296.68ms] Passed 4 tests
An overview of server-side resources used by Aco Variation Swatches for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.86 ▲0.34 | 53.77 ▲2.66 |
Dashboard /wp-admin | 3.74 ▲0.33 | 34.79 ▲1.67 |
Posts /wp-admin/edit.php | 3.96 ▲0.32 | 36.47 ▲0.92 |
Add New Post /wp-admin/post-new.php | 7.21 ▲0.24 | 93.99 ▼1,190.98 |
Media Library /wp-admin/upload.php | 3.62 ▲0.32 | 26.20 ▲1.67 |
Server storage [IO: ▲1.18MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options |
---|
acovsw_version |
Browser metrics Passed 4 tests
Aco Variation Swatches for WooCommerce: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,763 ▲10 | 15.84 ▲0.09 | 5.62 ▼1.59 | 2.31 ▼0.09 |
Dashboard /wp-admin | 2,894 ▲33 | 6.11 ▼0.14 | 127.41 ▼3.58 | 168.24 ▲9.66 |
Posts /wp-admin/edit.php | 2,688 ▼0 | 3.24 ▲0.01 | 62.51 ▼0.17 | 137.44 ▼3.31 |
Add New Post /wp-admin/post-new.php | 1,760 ▲99 | 22.24 ▲5.53 | 410.60 ▼8.93 | 158.17 ▲3.18 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.54 ▲0.03 | 137.40 ▲1.24 | 185.38 ▼2.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 1 option in the database
- acovsw_version
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
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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 action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-settings.php
- > /wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-attributes.php
- > /wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-product.php
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/aco-variation-swatches-for-woocommerce/start.php:22
- > PHP Warning
Use of undefined constant ACOVSW_TOKEN - assumed 'ACOVSW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-attributes.php on line 1
- > PHP Warning
Use of undefined constant ACOVSW_TOKEN - assumed 'ACOVSW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-settings.php on line 1
- > PHP Warning
Use of undefined constant ACOVSW_TOKEN - assumed 'ACOVSW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-variation-swatches-for-woocommerce/includes/views/admin-product.php on line 1
- > PHP Fatal error
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
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
- Donate link: Invalid URI found ("")
aco-variation-swatches-for-woocommerce/start.php 92% from 13 tests
Analyzing the main PHP file in "Aco Variation Swatches for WooCommerce" version 1.1.0
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("aco-variation-swatches-for-woocommerce.php" instead of "start.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,842 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 312 | 272 | 1,261 |
PO File | 2 | 144 | 144 | 296 |
CSS | 2 | 10 | 7 | 215 |
JavaScript | 2 | 12 | 5 | 57 |
SVG | 1 | 0 | 0 | 13 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 163)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.64 |
Average class complexity | 106.75 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 205.00 |
Average method complexity | 10.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 163.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 48 | |
▷ Static methods | 4 | 8.33% |
▷ Public methods | 47 | 97.92% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.08% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 7 | |
▷ Global constants | 7 | 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
8 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon1.png | 1.99KB | 1.17KB | ▼ 41.23% |
assets/images/ad_bg.png | 95.04KB | 103.00KB | 0.00% |
assets/images/acovsw-icons.png | 17.06KB | 5.99KB | ▼ 64.87% |
assets/images/link-go.png | 1.02KB | 0.24KB | ▼ 77.00% |
assets/images/calendar-icon.png | 1.18KB | 0.33KB | ▼ 72.29% |