Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲1.36MB] [CPU: ▲6.21ms] Passed 4 tests
This is a short check of server-side resources used by Product Preview for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.84 ▲1.38 | 45.34 ▲4.02 |
Dashboard /wp-admin | 4.67 ▲1.33 | 61.52 ▼0.35 |
Posts /wp-admin/edit.php | 4.79 ▲1.43 | 60.62 ▲13.63 |
Add New Post /wp-admin/post-new.php | 7.25 ▲1.37 | 105.42 ▲7.53 |
Media Library /wp-admin/upload.php | 4.60 ▲1.37 | 54.05 ▲19.13 |
Server storage [IO: ▲1.99MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: no new tables, 8 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
br-product_preview-options |
widget_recent-comments |
widget_theysaidso_widget |
berocket_admin_notices_rate_stars |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Product Preview for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.35 ▼0.03 | 1.67 ▲0.06 | 40.72 ▲1.31 |
Dashboard /wp-admin | 2,228 ▲48 | 5.67 ▲0.01 | 81.46 ▼5.15 | 99.94 ▲60.04 |
Posts /wp-admin/edit.php | 2,136 ▲39 | 2.06 ▲0.07 | 36.39 ▲1.29 | 38.07 ▲1.64 |
Add New Post /wp-admin/post-new.php | 1,577 ▲51 | 23.22 ▲0.21 | 681.39 ▲18.99 | 50.32 ▼5.74 |
Media Library /wp-admin/upload.php | 1,430 ▲27 | 4.24 ▲0.06 | 100.75 ▲3.59 | 77.32 ▲32.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin does not fully uninstall, leaving 8 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- berocket_key_activated_plugins
- can_compress_scripts
- theysaidso_admin_options
- berocket_admin_notices_rate_stars
- db_upgraded
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 | 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
- 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/product-preview-for-woocommerce/main.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/product-preview-for-woocommerce/berocket/includes/settings_fields.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-preview-for-woocommerce/berocket/includes/error_notices.php:5
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/product-preview-for-woocommerce/berocket/templates/premium.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-preview-for-woocommerce/berocket/sale/sale.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-preview-for-woocommerce/berocket/includes/admin_notices.php:797
- > PHP Notice
Undefined variable: title in wp-content/plugins/product-preview-for-woocommerce/berocket/templates/widget.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-preview-for-woocommerce/templates/style_section.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/product-preview-for-woocommerce/berocket/templates/settings.php:2
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-preview-for-woocommerce/berocket/includes/widget.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
- Screenshots: These screenshots have no corresponding images in /assets: #1 (General settings), #2 (Style settings), #3 (Text settings)
product-preview-for-woocommerce/product-preview.php 92% from 13 tests
The main PHP file in "Product Preview for WooCommerce" ver. 3.5.7.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-preview-for-woocommerce.php" instead of "product-preview.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
Good job! No executable or dangerous file extensions detected20,795 lines of code in 60 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 14 | 2,516 | 76 | 9,663 |
PHP | 36 | 432 | 1,627 | 8,793 |
JavaScript | 6 | 43 | 58 | 1,873 |
PO File | 2 | 194 | 216 | 430 |
XML | 2 | 0 | 0 | 36 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 51.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 240.00 |
Average method complexity | 4.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 98.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 25 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 25 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 345 | |
▷ Static methods | 135 | 39.13% |
▷ Public methods | 345 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 33 | |
▷ Named functions | 33 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
berocket/libraries/templates/default.png | 3.87KB | 2.63KB | ▼ 31.94% |
berocket/includes/ico.png | 1.90KB | 1.41KB | ▼ 25.89% |
berocket/assets/images/submenu-icon-a.png | 0.54KB | 0.48KB | ▼ 10.20% |
berocket/libraries/addons/default.png | 3.87KB | 2.63KB | ▼ 31.94% |
berocket/assets/css/mail.png | 2.59KB | 1.92KB | ▼ 26.02% |