Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.94ms] Passed 4 tests
A check of server-side resources used by Color and Image Swatches for Variable Product Attributes
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 46.21 ▼0.45 |
Dashboard /wp-admin | 3.31 ▲0.00 | 44.96 ▼1.75 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.35 ▲2.30 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 85.00 ▼14.77 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.58 ▲1.23 |
Server storage [IO: ▲2.67MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Color and Image Swatches for Variable Product Attributes
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.33 ▼1.06 | 1.91 ▼0.07 | 39.86 ▼2.89 |
Dashboard /wp-admin | 2,209 ▲18 | 5.86 ▲0.95 | 102.99 ▼1.84 | 38.89 ▲0.68 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 1.99 ▼0.05 | 36.09 ▼4.81 | 35.29 ▼1.47 |
Add New Post /wp-admin/post-new.php | 1,520 ▼0 | 23.30 ▲0.17 | 677.25 ▲77.66 | 59.26 ▲11.01 |
Media Library /wp-admin/upload.php | 1,391 ▼0 | 4.21 ▼0.05 | 98.57 ▲2.40 | 43.20 ▼0.13 |
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
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% 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 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 4× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/color-and-image-swatches-for-variable-product-attributes/include/support.php
- > /wp-content/plugins/color-and-image-swatches-for-variable-product-attributes/include/woocommerce-app.php
- > /wp-content/plugins/color-and-image-swatches-for-variable-product-attributes/include/premium-tab.php
- > /wp-content/plugins/color-and-image-swatches-for-variable-product-attributes/include/how-to-install.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/color-and-image-swatches-for-variable-product-attributes/include/general-settings.php:32
- > 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 83% 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:
- Tags: Please delete some tags, you are using 22 tag instead of maximum 10
color-and-image-swatches-for-variable-product-attributes/plugin.php 69% from 13 tests
"Color and Image Swatches for Variable Product Attributes" version 2.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "2.6.0")
- Description: The description should be shorter than 140 characters (currently 146 characters long)
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("color-and-image-swatches-for-variable-product-attributes.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin8,197 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 1,273 | 495 | 5,801 |
PHP | 10 | 971 | 65 | 1,674 |
CSS | 3 | 56 | 38 | 722 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 21.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 25.00 |
Average method complexity | 3.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 28 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
47 PNG files occupy 1.14MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/fill_check.png | 2.03KB | 0.80KB | ▼ 60.58% |
assets/images/Icon-5.png | 3.86KB | 2.99KB | ▼ 22.66% |
images/product view page.png | 91.39KB | 33.99KB | ▼ 62.81% |
assets/images/screenshot-2.png | 62.66KB | 22.93KB | ▼ 63.40% |
assets/images/App-2-3.png | 71.93KB | 23.52KB | ▼ 67.31% |