Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.63MB] [CPU: ▼49.18ms] Passed 4 tests
This is a short check of server-side resources used by WP Product Selector
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.35 ▼1.11 | 8.33 ▼32.48 |
Dashboard /wp-admin | 2.37 ▼0.93 | 12.38 ▼36.13 |
Posts /wp-admin/edit.php | 2.37 ▼0.98 | 10.56 ▼41.93 |
Add New Post /wp-admin/post-new.php | 2.37 ▼3.51 | 11.61 ▼86.18 |
Media Library /wp-admin/upload.php | 2.37 ▼0.86 | 13.50 ▼17.11 |
Selectors /wp-admin/edit-tags.php?taxonomy=selector-category&post_type=ps-questions | 2.37 | 11.43 |
Settings /wp-admin/edit.php?post_type=ps-questions&page=product-selector-settings-page | 2.37 | 11.02 |
Add New /wp-admin/post-new.php?post_type=ps-questions | 2.37 | 10.33 |
Instructions /wp-admin/edit.php?post_type=ps-questions&page=product-selector-instruction-submenu-page | 2.37 | 11.06 |
All Questions /wp-admin/edit.php?post_type=ps-questions | 2.37 | 17.10 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
first_field_option |
Browser metrics Passed 4 tests
A check of browser resources used by WP Product Selector
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,995 ▲249 | 14.08 ▼0.50 | 6.69 ▲4.87 | 67.71 ▲22.70 |
Dashboard /wp-admin | 2,273 ▲85 | 5.07 ▲0.19 | 109.14 ▼4.24 | 39.98 ▼3.07 |
Posts /wp-admin/edit.php | 2,158 ▲66 | 2.33 ▲0.28 | 39.43 ▼9.09 | 33.87 ▼6.97 |
Add New Post /wp-admin/post-new.php | 1,580 ▲44 | 18.17 ▼5.17 | 699.08 ▲93.48 | 39.43 ▼15.60 |
Media Library /wp-admin/upload.php | 1,455 ▲70 | 4.48 ▲0.16 | 103.67 ▲2.10 | 43.88 ▼0.26 |
Selectors /wp-admin/edit-tags.php?taxonomy=selector-category&post_type=ps-questions | 1,295 | 2.14 | 32.53 | 28.28 |
Settings /wp-admin/edit.php?post_type=ps-questions&page=product-selector-settings-page | 1,100 | 2.36 | 47.59 | 28.20 |
Add New /wp-admin/post-new.php?post_type=ps-questions | 1,639 | 2.96 | 62.86 | 33.45 |
Instructions /wp-admin/edit.php?post_type=ps-questions&page=product-selector-instruction-submenu-page | 1,458 | 8.18 | 232.03 | 50.38 |
All Questions /wp-admin/edit.php?post_type=ps-questions | 1,136 | 2.25 | 34.58 | 30.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the product-selector-ajax-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- Zombie WordPress options detected upon uninstall: 7 options
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- first_field_option
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 6 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=ps-questions
- > POST request to /wp-admin/admin-ajax.php
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the product-selector-ajax-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=ps-questions
- > Notice in wp-content/plugins/wp-product-selector/product-selector.php+223
Undefined variable: script_params
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=ps-questions
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
SRP 50% 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
Almost there! Just fix the following items
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-product-selector/includes/class-product-selector-actions.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-product-selector/includes/class-product-selector-ajax.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-product-selector/includes/class-product-selector-settings-page.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-product-selector/includes/class-product-selector-filters.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% 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
3 plugin tags: marketing, woocommerce, ecommerce
wp-product-selector/product-selector.php 77% from 13 tests
"WP Product Selector" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-product-selector.php" instead of "product-selector.php")
- Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.6")
- Description: Keep the plugin description shorter than 140 characters (currently 264 characters long)
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 plugin1,488 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 275 | 250 | 838 |
CSS | 2 | 65 | 22 | 534 |
JavaScript | 5 | 62 | 53 | 116 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 7.33 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 1 | 33.33% |
Methods | 21 | |
▷ Static methods | 4 | 19.05% |
▷ Public methods | 18 | 85.71% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 14.29% |
Functions | 24 | |
▷ Named functions | 24 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 10 | 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
PNG images were not found in this plugin