Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.22ms] Passed 4 tests
Analyzing server-side resources used by Product Swatches Light
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 36.25 ▼1.91 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.59 ▼2.20 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 42.84 ▼1.10 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 79.43 ▼7.67 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.28 ▲0.60 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Product Swatches Light
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,809 ▲48 | 14.67 ▲0.26 | 1.78 ▲0.22 | 43.70 ▼1.10 |
Dashboard /wp-admin | 2,198 ▲17 | 5.62 ▼0.05 | 84.00 ▼14.39 | 41.19 ▼1.84 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.96 ▼0.07 | 32.83 ▼1.29 | 34.09 ▼2.23 |
Add New Post /wp-admin/post-new.php | 1,526 ▼9 | 23.54 ▲5.25 | 681.57 ▲51.25 | 52.59 ▼6.99 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.20 ▼0.04 | 95.71 ▼1.44 | 40.09 ▼4.05 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
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 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
Please fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/product-swatches-light/templates/parts/list-end.php
- 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/product-swatches-light/templates/parts/list-start.php:7
- > PHP Fatal error
Uncaught Error: Interface 'LW_Swatches\\fieldtype' not found in wp-content/plugins/product-swatches-light/classes/fieldtype/class-colorselect.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/product-swatches-light/templates/parts/list-item-linked.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/product-swatches-light/templates/parts/list-item.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-swatches-light/inc/transients.php:42
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-swatches-light/inc/admin.php:54
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-swatches-light/inc/woocommerce.php:16
- > PHP Fatal error
Uncaught Error: Interface 'LW_Swatches\\attributeType' not found in wp-content/plugins/product-swatches-light/classes/attributetype/class-color.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: woocommerce, variant swatches, variation swatches, product swatches
product-swatches-light/product-swatches-light.php Passed 13 tests
"Product Swatches Light" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
Provides product swatches for WooCommerce.
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
Success! There were no dangerous files found in this plugin1,738 lines of code in 31 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 258 | 792 | 1,330 |
PO File | 2 | 102 | 126 | 238 |
JavaScript | 3 | 10 | 32 | 129 |
CSS | 3 | 11 | 5 | 41 |
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 code | 0.36 |
Average class complexity | 12.18 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 32.00 |
Average method complexity | 3.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 2 | |
Traits | 1 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 36 | 67.92% |
▷ Public methods | 49 | 92.45% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 7.55% |
Functions | 27 | |
▷ Named functions | 26 | 96.30% |
▷ Anonymous functions | 1 | 3.70% |
Constants | 10 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 10 | 100.00% |
▷ Public constants | 10 | 100.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
17 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/jquery/images/ui-icons_777620_256x240.png | 4.56KB | 4.18KB | ▼ 8.31% |
lib/jquery/images/ui-icons_888888_256x240.png | 6.94KB | 4.18KB | ▼ 39.78% |
lib/jquery/images/ui-icons_222222_256x240.png | 6.86KB | 4.18KB | ▼ 39.05% |
lib/jquery/images/ui-icons_444444_256x240.png | 6.97KB | 4.18KB | ▼ 40.04% |
lib/jquery/images/ui-icons_555555_256x240.png | 6.96KB | 4.18KB | ▼ 39.91% |