Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
- This plugin did not install gracefully
- > Error in wp-content/plugins/brands-for-woocommerce/main.php+318
Uncaught Error: Call to undefined function woocommerce_get_page_id() in wp-content/plugins/brands-for-woocommerce/main.php:318
Stack trace:
#0 wp-content/plugins/brands-for-woocommerce/main.php(1262): BeRocket_product_brand->register_taxonomy()
#1 wp-includes/class-wp-hook.php(310): BeRocket_product_brand->activation()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/includes/plugin.php(693): do_action()
Server metrics [RAM: ▼0.01MB] [CPU: ▼6.56ms] Passed 4 tests
Server-side resources used by Brands for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 42.14 ▲1.90 |
Dashboard /wp-admin | 3.31 ▼0.04 | 49.02 ▼18.10 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 52.16 ▼0.39 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 96.07 ▲0.99 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.64 ▼8.73 |
Server storage [IO: ▲2.50MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 150 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
br-product_brand-options |
Browser metrics Passed 4 tests
An overview of browser requirements for Brands for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,840 ▲54 | 14.86 ▲0.47 | 2.13 ▲0.27 | 45.13 ▲2.71 |
Dashboard /wp-admin | 2,221 ▲21 | 5.88 ▲0.03 | 99.62 ▼2.39 | 41.31 ▼1.17 |
Posts /wp-admin/edit.php | 2,103 ▼0 | 2.04 ▼0.02 | 40.91 ▼3.77 | 37.79 ▼0.62 |
Add New Post /wp-admin/post-new.php | 1,554 ▲9 | 18.36 ▼4.89 | 603.99 ▼98.86 | 48.83 ▲0.12 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.24 ▼0.04 | 101.20 ▼10.35 | 44.34 ▼2.77 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/brands-for-woocommerce/templates/description.php
- > /wp-content/plugins/brands-for-woocommerce/templates/list.php
- 66× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'BeRocket_framework_addon_lib' not found in wp-content/plugins/brands-for-woocommerce/addons/divi_shortcode/divi_shortcode.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brands-for-woocommerce/berocket/includes/admin_notices.php:797
- > PHP Fatal error
Uncaught Error: Class 'BeRocket_Brand_Base_Widget' not found in wp-content/plugins/brands-for-woocommerce/includes/widgets/base-widget_base_product_list.php:2
- > PHP Notice
Undefined variable: ordered_terms in wp-content/plugins/brands-for-woocommerce/templates/list.php on line 74
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/brands-for-woocommerce/templates/catalog.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/brands-for-woocommerce/main.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/brands-for-woocommerce/includes/widgets/base-widget.php:2
- > PHP Fatal error
Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/brands-for-woocommerce/divi/includes/modules/product_brands_info/product_brands_info.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/brands-for-woocommerce/addons/divi_shortcode/divi-builder.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brands-for-woocommerce/templates/permalink_option.php:2
- > PHP Fatal error
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 88% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Tags: You are using too many tags: 24 tag instead of maximum 10
- Screenshots: These screenshots have no corresponding images in /assets: #1 (General settings), #2 (Adding brands)
brands-for-woocommerce/woocommerce-brand.php 92% from 13 tests
Analyzing the main PHP file in "Brands for WooCommerce" version 3.8.2.3
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("brands-for-woocommerce.php" instead of "woocommerce-brand.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected29,302 lines of code in 107 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 65 | 1,008 | 1,483 | 14,551 |
CSS | 17 | 2,654 | 100 | 10,150 |
PO File | 4 | 946 | 1,078 | 2,041 |
JavaScript | 14 | 95 | 86 | 2,029 |
JSX | 5 | 30 | 5 | 497 |
XML | 2 | 0 | 0 | 34 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 30.41 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 240.00 |
Average method complexity | 4.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 98.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 59 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 59 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 538 | |
▷ Static methods | 139 | 25.84% |
▷ Public methods | 498 | 92.57% |
▷ Protected methods | 21 | 3.90% |
▷ Private methods | 19 | 3.53% |
Functions | 46 | |
▷ Named functions | 41 | 89.13% |
▷ Anonymous functions | 5 | 10.87% |
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
PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
berocket/assets/css/mail.png | 2.59KB | 1.92KB | ▼ 26.02% |
berocket/libraries/addons/default.png | 3.87KB | 2.63KB | ▼ 31.94% |
berocket/includes/ico.png | 1.90KB | 1.41KB | ▼ 25.89% |
images/ad_white_on_orange.png | 20.67KB | 15.57KB | ▼ 24.67% |
berocket/libraries/templates/default.png | 3.87KB | 2.63KB | ▼ 31.94% |