Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- The plugin did not install without errors
- > User deprecated in wp-includes/functions.php+5453
Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
Server metrics [RAM: ▲0.05MB] [CPU: ▼0.64ms] Passed 4 tests
Analyzing server-side resources used by TP Products Compare for Woocommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 38.30 ▼2.31 |
Dashboard /wp-admin | 3.35 ▲0.05 | 42.63 ▼5.69 |
Posts /wp-admin/edit.php | 3.40 ▲0.05 | 49.36 ▲5.29 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.07 | 96.18 ▲4.69 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 37.07 ▲0.77 |
Server storage [IO: ▲0.38MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 27 new options
New WordPress options |
---|
tpwc_display_share_buttons |
widget_theysaidso_widget |
tpwc_product_compare_button_padding |
can_compress_scripts |
tpwc_add_to_cart_padding |
tpwc_fields_to_show |
db_upgraded |
tpwc_product_compare_button_color |
tpwc_open_compare_button_color |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for TP Products Compare for Woocommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,943 ▲208 | 13.64 ▼0.74 | 7.34 ▲5.52 | 39.66 ▼9.98 |
Dashboard /wp-admin | 2,232 ▲44 | 5.88 ▲0.78 | 97.45 ▼20.07 | 78.77 ▲29.15 |
Posts /wp-admin/edit.php | 2,112 ▲23 | 2.03 ▲0.03 | 38.88 ▲1.70 | 36.47 ▲1.00 |
Add New Post /wp-admin/post-new.php | 1,535 ▲2 | 23.14 ▼0.23 | 700.06 ▲17.96 | 37.75 ▼19.07 |
Media Library /wp-admin/upload.php | 1,411 ▲23 | 4.15 ▼0.02 | 97.61 ▼15.65 | 78.07 ▲30.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- tp_woocommerce_compare_page_id
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-products-compare-for-woocommerce/admin/partials/tp-woocommerce-compare-admin-display.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/tp-products-compare-for-woocommerce/public/partials/tp-woocommerce-compare-public-display.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce product compare, compare, woocommerce compare, product compare
tp-products-compare-for-woocommerce/tp-products-compare-for-woocommerce.php 92% from 13 tests
This is the main PHP file of "TP Products Compare for Woocommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,444 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 10 | 142 | 96 | 1,694 |
PHP | 12 | 308 | 624 | 1,082 |
HTML | 1 | 11 | 0 | 322 |
JavaScript | 4 | 65 | 50 | 185 |
JSON | 1 | 0 | 0 | 130 |
SVG | 1 | 19 | 0 | 31 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 6.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 35.00 |
Average method complexity | 2.18 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 34 | |
▷ Static methods | 2 | 5.88% |
▷ Public methods | 29 | 85.29% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 14.71% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/partials/images/tp.png | 1.24KB | 0.26KB | ▼ 79.08% |
admin/partials/images/jquery.minicolors.png | 67.02KB | 34.31KB | ▼ 48.80% |
admin/images/jquery.minicolors.png | 67.02KB | 34.31KB | ▼ 48.80% |