Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼8.99ms] Passed 4 tests
Server-side resources used by Related Products for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 35.12 ▼7.16 |
Dashboard /wp-admin | 3.41 ▲0.06 | 46.14 ▼11.28 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 47.79 ▼9.86 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 93.38 ▼7.66 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 38.18 ▲7.18 |
Server storage [IO: ▲2.92MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 80 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
crp_version |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
Related Products for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,798 ▲36 | 14.24 ▼0.04 | 1.92 ▲0.14 | 36.26 ▼8.35 |
Dashboard /wp-admin | 2,206 ▲32 | 5.56 ▼0.09 | 92.61 ▼1.97 | 44.12 ▲1.47 |
Posts /wp-admin/edit.php | 2,108 ▲5 | 1.98 ▼0.11 | 40.26 ▼3.49 | 37.73 ▲1.06 |
Add New Post /wp-admin/post-new.php | 1,534 ▲8 | 23.12 ▼0.39 | 612.44 ▼12.05 | 58.14 ▼2.09 |
Media Library /wp-admin/upload.php | 1,408 ▲11 | 4.20 ▲0.05 | 100.98 ▼1.75 | 43.53 ▲0.17 |
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
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 7 options
- widget_recent-comments
- can_compress_scripts
- crp_version
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wt-woocommerce-related-products/admin/partials/admin-settings-other-solutions.php
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wt-woocommerce-related-products/includes/class-wt-relatedproducts-uninstall-feedback.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/wt-woocommerce-related-products/public/partials/wt-custom-related.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wt-woocommerce-related-products/admin/partials/custom-related-products-admin-display.php:17
- > PHP Warning
Use of undefined constant CRP_PLUGIN_URL - assumed 'CRP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wt-woocommerce-related-products/admin/partials/custom-related-products-admin-display.php on line 14
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wt-woocommerce-related-products/admin/partials/custom-related-products-admin-tab-view.php:4
- > 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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: linked products, related products for woocommerce, custom related products, product tags, related products...
wt-woocommerce-related-products/custom-related-products.php 92% from 13 tests
The main PHP file in "Related Products for WooCommerce" ver. 1.5.1 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: Name the main plugin file the same as the plugin slug ("wt-woocommerce-related-products.php" instead of "custom-related-products.php")
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
Everything looks great! No dangerous files found in this plugin12,529 lines of code in 57 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 6 | 775 | 1,480 | 6,412 |
PHP | 23 | 824 | 806 | 3,905 |
PO File | 5 | 605 | 811 | 1,707 |
SVG | 17 | 0 | 0 | 313 |
CSS | 5 | 16 | 25 | 187 |
XML | 1 | 0 | 0 | 5 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 25.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 106.00 |
Average method complexity | 3.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 40.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 112 | |
▷ Static methods | 9 | 8.04% |
▷ Public methods | 101 | 90.18% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 11 | 9.82% |
Functions | 14 | |
▷ Named functions | 13 | 92.86% |
▷ Anonymous functions | 1 | 7.14% |
Constants | 7 | |
▷ Global constants | 6 | 85.71% |
▷ Class constants | 1 | 14.29% |
▷ Public constants | 1 | 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
6 PNG files occupy 0.56MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/other_solutions/best-seller.png | 294.86KB | 77.67KB | ▼ 73.66% |
admin/img/other_solutions/frequently-bought-together.png | 115.75KB | 43.56KB | ▼ 62.36% |
public/images/controls.png | 1.17KB | 1.42KB | 0.00% |
admin/img/other_solutions/product-recommendations.png | 151.32KB | 45.97KB | ▼ 69.62% |
admin/img/wt_logo.png | 2.02KB | 1.08KB | ▼ 46.55% |