Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲5.41MB] [CPU: ▲18.02ms] 75% from 4 tests
A check of server-side resources used by Premmerce Variation Swatches for WooCommerce
The following require your attention
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.41MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.25 ▲5.79 | 62.54 ▲18.66 |
Dashboard /wp-admin | 9.27 ▲5.97 | 69.30 ▲20.23 |
Posts /wp-admin/edit.php | 9.27 ▲5.91 | 67.40 ▲19.01 |
Add New Post /wp-admin/post-new.php | 9.86 ▲3.97 | 112.75 ▲14.19 |
Media Library /wp-admin/upload.php | 9.27 ▲6.04 | 65.10 ▲29.61 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.27 | 57.50 |
Server storage [IO: ▲8.11MB] [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: 353 new files
Database: 1 new table, 11 new options
New tables |
---|
wp_premmerce_attributes |
New WordPress options |
---|
premmerce_main_attributes |
widget_theysaidso_widget |
fs_debug_mode |
db_upgraded |
can_compress_scripts |
premmerce_advanced_attributes_db_version |
widget_recent-posts |
fs_active_plugins |
fs_accounts |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Premmerce Variation Swatches for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.80 ▲0.15 | 1.68 ▼0.18 | 32.80 ▼11.42 |
Dashboard /wp-admin | 2,231 ▲63 | 4.87 ▼0.20 | 113.18 ▲7.95 | 49.55 ▲5.90 |
Posts /wp-admin/edit.php | 2,113 ▲24 | 2.06 ▲0.09 | 34.92 ▼4.88 | 32.70 ▼4.77 |
Add New Post /wp-admin/post-new.php | 1,540 ▲1 | 23.08 ▼0.27 | 651.19 ▼36.46 | 61.24 ▲7.45 |
Media Library /wp-admin/upload.php | 1,416 ▲25 | 4.25 ▲0.16 | 97.43 ▼10.71 | 46.44 ▼0.78 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,078 | 1.71 | 26.18 | 29.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/premmerce-woocommerce-variation-swatches/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 11 options
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- fs_accounts
- fs_debug_mode
- premmerce_main_attributes
- widget_theysaidso_widget
- theysaidso_admin_options
- fs_active_plugins
- can_compress_scripts
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 6× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/color.php
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/bicolor.php
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/radio.php
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/label.php
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/image.php
- > /wp-content/plugins/premmerce-woocommerce-variation-swatches/views/frontend/variation-wrapper.php
- 24× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/radio.php on line 6
- > PHP Fatal error
Uncaught Error: Interface 'Premmerce\\Attributes\\Admin\\Tabs\\Base\\TabInterface' not found in wp-content/plugins/premmerce-woocommerce-variation-swatches/src/Admin/Tabs/SimpleTab.php:7
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/color.php on line 11
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/bicolor.php on line 10
- > PHP Fatal error
Uncaught Error: Interface 'Premmerce\\Attributes\\Admin\\Tabs\\Base\\TabInterface' not found in wp-content/plugins/premmerce-woocommerce-variation-swatches/src/Admin/Tabs/BundleAndSave.php:6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/color.php on line 11
- > PHP Fatal error
Uncaught Error: Interface 'Premmerce\\Attributes\\Admin\\Tabs\\Base\\TabInterface' not found in wp-content/plugins/premmerce-woocommerce-variation-swatches/src/Admin/Tabs/Base/BaseSettings.php:3
- > PHP Notice
Undefined variable: options in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/woocommerce/variations/color.php on line 11
- > PHP Fatal error
Uncaught Error: Class 'Premmerce\\Attributes\\Admin\\Tabs\\Base\\BaseSettings' not found in wp-content/plugins/premmerce-woocommerce-variation-swatches/src/Admin/Tabs/Settings.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/premmerce-woocommerce-variation-swatches/views/frontend/attribute-description.php:7
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: variation swatches, woocommerce attributes, image attributes, catalog purchase, extended attributes...
premmerce-woocommerce-variation-swatches/premmerce-advanced-attributes.php 77% from 13 tests
The main PHP file in "Premmerce Variation Swatches for WooCommerce" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("premmerce-woocommerce-variation-swatches.php" instead of "premmerce-advanced-attributes.php")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "3.0.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected95,816 lines of code in 250 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 4 | 0 | 0 | 42,246 |
PHP | 178 | 8,683 | 18,262 | 36,293 |
CSS | 18 | 1,169 | 211 | 10,165 |
JavaScript | 39 | 746 | 451 | 3,398 |
PO File | 5 | 465 | 578 | 1,651 |
Sass | 1 | 229 | 14 | 1,328 |
SVG | 3 | 0 | 2 | 628 |
Markdown | 2 | 66 | 0 | 107 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 69.97 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 11 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 65 | |
▷ Abstract classes | 3 | 4.62% |
▷ Concrete classes | 62 | 95.38% |
▷ Final classes | 0 | 0.00% |
Methods | 1,433 | |
▷ Static methods | 240 | 16.75% |
▷ Public methods | 1,035 | 72.23% |
▷ Protected methods | 18 | 1.26% |
▷ Private methods | 380 | 26.52% |
Functions | 117 | |
▷ Named functions | 105 | 89.74% |
▷ Anonymous functions | 12 | 10.26% |
Constants | 158 | |
▷ Global constants | 98 | 62.03% |
▷ Class constants | 60 | 37.97% |
▷ Public constants | 60 | 100.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
39 PNG files occupy 0.85MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/premmerce-pricing-page/src/assets/img/mastercard.png | 1.63KB | 1.49KB | ▼ 8.47% |
assets/admin/js/pricing-page/4375c4a3ddc6f637c2ab9a2d7220f91e.png | 9.16KB | 5.26KB | ▼ 42.58% |
assets/admin/img/permalink.png | 25.02KB | 9.05KB | ▼ 63.85% |
assets/admin/img/variants.png | 26.28KB | 9.68KB | ▼ 63.17% |
assets/premmerce-pricing-page/src/assets/img/comodo-short-green.png | 11.80KB | 3.94KB | ▼ 66.64% |