Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲3.60MB] [CPU: ▲19.03ms] Passed 4 tests
An overview of server-side resources used by Predictive Search for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 6.97 ▲3.50 | 53.05 ▲17.47 |
Dashboard /wp-admin | 6.94 ▲3.63 | 70.81 ▲19.91 |
Posts /wp-admin/edit.php | 6.99 ▲3.63 | 65.51 ▲15.64 |
Add New Post /wp-admin/post-new.php | 9.63 ▲3.74 | 110.27 ▲23.08 |
Media Library /wp-admin/upload.php | 6.86 ▲3.63 | 58.69 ▲26.77 |
Predictive Search /wp-admin/admin.php?page=woo-predictive-search | 6.97 | 79.30 |
Server storage [IO: ▲2.98MB] [DB: ▲0.08MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 199 new files
Database: 4 new tables, 38 new options
New tables |
---|
wp_ps_product_sku |
wp_ps_exclude |
wp_ps_postmeta |
wp_ps_posts |
New WordPress options |
---|
wc_predictive_search_sidebar_template_settings |
woocommerce_search_allow_auto_sync_data |
woocommerce_search_price_enable |
wc_predictive_search_input_box_settings |
woocommerce_search_sku_enable |
can_compress_scripts |
woocommerce_search_text_lenght |
db_upgraded |
widget_recent-posts |
woocommerce_search_is_debug |
... |
Browser metrics Passed 4 tests
Predictive Search for WooCommerce: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,483 ▼279 | 14.63 ▲0.36 | 0.54 ▼1.07 | 18.84 ▼20.82 |
Dashboard /wp-admin | 2,212 ▲37 | 5.62 ▼0.09 | 96.75 ▼15.58 | 43.64 ▼2.79 |
Posts /wp-admin/edit.php | 2,118 ▲18 | 2.12 ▲0.17 | 42.03 ▲2.42 | 35.55 ▼0.51 |
Add New Post /wp-admin/post-new.php | 1,815 ▲289 | 25.07 ▲2.01 | 620.13 ▼29.97 | 76.64 ▲21.85 |
Media Library /wp-admin/upload.php | 1,420 ▲20 | 4.18 ▲0.04 | 96.42 ▼2.30 | 44.37 ▲1.12 |
Predictive Search /wp-admin/admin.php?page=woo-predictive-search | 2,715 | 4.34 | 108.60 | 106.86 |
Uninstaller [IO: ▲0.05MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 4 tables in the database
- wp_ps_exclude
- wp_ps_posts
- wp_ps_product_sku
- wp_ps_postmeta
- This plugin does not fully uninstall, leaving 37 options in the database
- woocommerce_search_result_grid_container_class
- woocommerce_search_result_items
- widget_recent-comments
- woocommerce_search_exclude_products
- woocommerce_search_exclude_pages
- woocommerce_search_schedule_time_sync_data
- db_upgraded
- woocommerce_search_replace_special_character
- woocommerce_search_addtocart_enable
- woocommerce_search_exclude_out_stock
- ...
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 54× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: sidebar_search_box_align in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/sidebar-template-style.php on line 15
- > PHP Notice
Undefined variable: header_search_box_wide in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/header-template-style.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-predictive-search/admin/wc-predictive-search-init.php:44
- > PHP Notice
Undefined variable: sidebar_search_box_border in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/sidebar-template-style.php on line 8
- > PHP Fatal error
Uncaught Error: Call to a member function generate_border_css() on null in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/header-template-style.php:22
- > PHP Notice
Undefined variable: header_search_box_mobile_margin_right in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/header-template-style.php on line 9
- > PHP Warning
Use of undefined constant WOOPS_PREFIX - assumed 'WOOPS_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/header-template-style.php on line 22
- > PHP Notice
Undefined variable: sidebar_search_box_mobile_margin_bottom in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/sidebar-template-style.php on line 12
- > PHP Notice
Undefined variable: sidebar_search_box_border in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/sidebar-template-style.php on line 9
- > PHP Notice
Undefined variable: header_search_box_mobile_margin_top in wp-content/plugins/woocommerce-predictive-search/templates/dynamic-styles/header-template-style.php on line 12
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: elementor woocommerce search, woocommerce, live search, woocommerce search, predictive search
woocommerce-predictive-search/wc-predictive-search.php 92% from 13 tests
"Predictive Search for WooCommerce" version 5.8.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-predictive-search.php" instead of "wc-predictive-search.php")
Code Analysis 97% from 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
No dangerous file extensions were detected50,851 lines of code in 133 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 67 | 3,630 | 3,097 | 15,611 |
JavaScript | 30 | 2,124 | 1,568 | 13,215 |
JSON | 1 | 0 | 0 | 13,203 |
PO File | 5 | 2,028 | 3,651 | 4,569 |
CSS | 21 | 311 | 160 | 3,535 |
LESS | 5 | 75 | 26 | 642 |
SVG | 3 | 3 | 0 | 47 |
HTML | 1 | 2 | 0 | 29 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 410)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 56.09 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 801.00 |
Average method complexity | 5.35 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 410.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 46 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 46 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 583 | |
▷ Static methods | 47 | 8.06% |
▷ Public methods | 414 | 71.01% |
▷ Protected methods | 141 | 24.19% |
▷ Private methods | 28 | 4.80% |
Functions | 38 | |
▷ Named functions | 36 | 94.74% |
▷ Anonymous functions | 2 | 5.26% |
Constants | 20 | |
▷ Global constants | 15 | 75.00% |
▷ Class constants | 5 | 25.00% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
33 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/free-wordpress-plugins.png | 79.93KB | 29.22KB | ▼ 63.44% |
admin/assets/images/slider-bg-track1.png | 1.10KB | 0.61KB | ▼ 44.28% |
assets/images/key.png | 0.60KB | 0.59KB | ▼ 1.47% |
admin/assets/images/slider-container-end.png | 1.83KB | 0.71KB | ▼ 61.18% |
assets/images/follow-facebook.png | 1.56KB | 0.43KB | ▼ 72.77% |