Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/woocommerce-catalog-enquiry/includes/woocommerce-catalog-enquiry-core-functions.php+40
Invalid argument supplied for foreach()
Server metrics [RAM: ▼0.93MB] [CPU: ▼319.34ms] Passed 4 tests
A check of server-side resources used by WC Catalog Enquiry
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.38 | 53.95 ▲5.73 |
Dashboard /wp-admin | 3.40 ▼0.01 | 21.67 ▼11.47 |
Posts /wp-admin/edit.php | 3.40 ▼0.24 | 21.66 ▼15.92 |
Add New Post /wp-admin/post-new.php | 3.40 ▼3.57 | 21.17 ▼1,248.49 |
Media Library /wp-admin/upload.php | 3.40 ▲0.10 | 22.75 ▼1.48 |
Settings /wp-admin/admin.php?page=woo-catalog | 3.40 | 21.15 |
Upgrade to Pro /wp-admin/admin.php?page= | 3.40 | 21.14 |
Server storage [IO: ▲0.84MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 5 new options
New WordPress options |
---|
woocommerce_catalog_enquiry_from_settings |
woocommerce_catalog_enquiry_general_settings |
woocommerce_catalog_migration_completed |
woocommerce_catalog_enquiry_button_appearence_settings |
woocommerce_catalog_enquiry_exclusion_settings |
Browser metrics Passed 4 tests
Checking browser requirements for WC Catalog Enquiry
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,816 ▲62 | 15.63 ▼0.34 | 5.93 ▲0.23 | 1.98 ▼0.31 |
Dashboard /wp-admin | 2,945 ▲84 | 6.14 ▼0.03 | 115.50 ▼14.89 | 158.00 ▲1.31 |
Posts /wp-admin/edit.php | 2,744 ▲50 | 3.25 ▲0.01 | 62.15 ▼4.92 | 138.73 ▼9.28 |
Add New Post /wp-admin/post-new.php | 1,694 ▲33 | 16.07 ▲0.32 | 397.13 ▼24.62 | 158.59 ▼1.95 |
Media Library /wp-admin/upload.php | 1,750 ▲52 | 5.52 ▲0.04 | 141.42 ▼138.73 | 190.29 ▼1.55 |
Settings /wp-admin/admin.php?page=woo-catalog | 1,774 | 5.12 | 101.54 | 131.71 |
Upgrade to Pro /wp-admin/admin.php?page= | 850 | 2.10 | 36.91 | 69.54 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/woocommerce-catalog-enquiry/includes/woocommerce-catalog-enquiry-core-functions.php+183
Trying to get property 'term_id' of non-object
- The uninstall procedure has failed, leaving 5 options in the database
- woocommerce_catalog_enquiry_from_settings
- woocommerce_catalog_enquiry_exclusion_settings
- woocommerce_catalog_enquiry_button_appearence_settings
- woocommerce_catalog_migration_completed
- woocommerce_catalog_enquiry_general_settings
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
- 36 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=
- > Notice in wp-content/plugins/woocommerce-catalog-enquiry/includes/woocommerce-catalog-enquiry-core-functions.php+183
Trying to get property 'term_id' of non-object
- 36 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=
- > Notice in wp-content/plugins/woocommerce-catalog-enquiry/includes/woocommerce-catalog-enquiry-core-functions.php+183
Trying to get property 'name' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=
- > Warning in wp-includes/pluggable.php+1358
Cannot modify header information - headers already sent by (output started at wp-admin/includes/misc.php:1013)
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/multiselect.php
- > /wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/select.php
- > /wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/textarea.php
- 79× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined variable: id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/textarea.php on line 9
- > PHP Notice
Undefined variable: id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/wpeditor.php on line 10
- > PHP Notice
Undefined variable: setting_id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/color.php on line 11
- > PHP Notice
Undefined variable: name in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/multiselect.php on line 8
- > PHP Notice
Undefined variable: id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/textbox.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/password.php:9
- > PHP Notice
Undefined variable: id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/upload.php on line 11
- > PHP Notice
Undefined variable: id in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/upload.php on line 8
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/export.php:8
- > PHP Notice
Undefined variable: name in wp-content/plugins/woocommerce-catalog-enquiry/framework/field-types/textarea.php on line 9
- > PHP Notice
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=woo-catalog
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'nodeType')" "TypeError: Cannot read properties of undefined (reading 'nodeType')\n at s.fn.init.x.fn.position (/wp-includes/js/jquery/ui/core.min.js?ver=1.13.1:80:1386)\n at reCenterButton (/wp-content/plugins/woocommerce-catalog-enquiry/assets/admin/js/button_gen.js?ver=4.0.7:131:46)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/woocommerce-catalog-enquiry/assets/admin/js/button_gen.js?ver=4.0.7:144:9)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30340)" undefined
- > GET request to /wp-admin/admin.php?page=woo-catalog
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'nodeType')
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% 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
These attributes need to be fixed:
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
woocommerce-catalog-enquiry/Woocommerce_Catalog_Enquiry.php 85% from 13 tests
"WC Catalog Enquiry" version 4.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-catalog-enquiry.php" instead of "Woocommerce_Catalog_Enquiry.php")
- Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "4.2")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin12,828 lines of code in 57 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 12 | 1,511 | 372 | 6,825 |
CSS | 10 | 403 | 237 | 3,120 |
PHP | 35 | 435 | 379 | 2,883 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 57.62 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 324.00 |
Average method complexity | 7.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 68.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 70 | |
▷ Static methods | 3 | 4.29% |
▷ Public methods | 70 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
33 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/admin/images/colorpicker_rgb_b.png | 0.95KB | 0.76KB | ▼ 19.48% |
(invalid) lib/jquery/upload/images/Placeholderdoc.png | 14.84KB | 0.00KB | ▼ 100.00% |
lib/jquery/upload/images/Placeholderppt.png | 8.91KB | 3.19KB | ▼ 64.24% |
assets/admin/images/colorpicker_hsb_s.png | 1.14KB | 0.80KB | ▼ 29.97% |
lib/jquery/upload/images/Placeholderpdf.png | 14.58KB | 5.45KB | ▼ 62.63% |