Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.03MB] [CPU: ▼11.45ms] Passed 4 tests
This is a short check of server-side resources used by Smart WooCommerce Swatches, Photos And Filter by Attribute
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.03 | 44.55 ▲3.44 |
Dashboard /wp-admin | 3.34 ▲0.03 | 57.97 ▲3.88 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 46.36 ▼5.95 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 84.16 ▼41.18 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.88 ▼2.12 |
Server storage [IO: ▲0.94MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Smart WooCommerce Swatches, Photos And Filter by Attribute: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲59 | 14.63 ▲0.29 | 2.06 ▲0.06 | 40.37 ▼7.48 |
Dashboard /wp-admin | 2,201 ▲24 | 5.65 ▼0.01 | 84.66 ▼18.89 | 43.59 ▼1.34 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.01 ▲0.06 | 35.56 ▼3.69 | 34.04 ▼2.63 |
Add New Post /wp-admin/post-new.php | 1,532 ▲6 | 23.52 ▲0.41 | 654.01 ▼123.96 | 58.53 ▲3.94 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.22 ▲0.04 | 98.45 ▼21.67 | 41.36 ▼10.34 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Almost there! Just fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/variation-swatches-style/inc/plugins-settings.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/variation-swatches-style/inc/tutorials.php:5
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/variation-swatches-style/inc/widgets-helper.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
- Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
- Screenshots: These screenshots do not have images: #1 (Variations on frontend), #2 (Add new attribute), #3 (Edit Attribute), #4 (Attribute color), #5 (Variations Options)
variation-swatches-style/smart-variation-swatches-for-woocommerce.php 77% from 13 tests
The principal PHP file in "Smart WooCommerce Swatches, Photos And Filter by Attribute" v. 1.3.7 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("variation-swatches-style.php" instead of "smart-variation-swatches-for-woocommerce.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "3")
Code Analysis Passed 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
Success! There were no dangerous files found in this plugin2,889 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 743 | 740 | 2,339 |
CSS | 2 | 53 | 12 | 397 |
JavaScript | 2 | 64 | 27 | 153 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 52.22 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 143.00 |
Average method complexity | 5.27 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 48.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 1 | 11.11% |
Methods | 108 | |
▷ Static methods | 6 | 5.56% |
▷ Public methods | 108 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.76MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-5.png | 37.92KB | 12.06KB | ▼ 68.20% |
screenshot-2.png | 365.96KB | 131.93KB | ▼ 63.95% |
assets/img/archive_swatches.png | 26.84KB | 15.23KB | ▼ 43.28% |
screenshot.png | 132.29KB | 51.50KB | ▼ 61.07% |
screenshot-1.png | 132.29KB | 51.50KB | ▼ 61.07% |