Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼4.62ms] Passed 4 tests
Server-side resources used by WPHobby Ajax Search for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 36.94 ▲0.62 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.84 ▼2.47 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 46.52 ▲8.15 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 80.19 ▼18.29 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 33.52 ▲1.66 |
Server storage [IO: ▲1.00MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
WPHobby Ajax Search for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,806 ▲60 | 13.26 ▼0.91 | 1.71 ▲0.09 | 39.38 ▼1.70 |
Dashboard /wp-admin | 2,212 ▲21 | 5.87 ▲0.97 | 93.53 ▼26.36 | 38.62 ▼8.22 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.06 ▲0.07 | 39.76 ▲1.94 | 36.03 ▲4.45 |
Add New Post /wp-admin/post-new.php | 1,520 ▼22 | 17.73 ▼0.57 | 637.00 ▼29.21 | 45.00 ▼10.03 |
Media Library /wp-admin/upload.php | 1,394 ▲12 | 4.29 ▲0.09 | 95.46 ▲0.79 | 45.13 ▲4.04 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/help/tab-help.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/general/tab-advanced.php:12
- > PHP Warning
require(WHWAS_DIRchanges.txt): failed to open stream: No such file or directory in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/help/tab-change-log.php on line 12
- > PHP Warning
Use of undefined constant WHWAS_DIR - assumed 'WHWAS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/help/tab-change-log.php on line 12
- > PHP Fatal error
require(): Failed opening required 'WHWAS_DIRchanges.txt' (include_path='.:/usr/share/php') in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/help/tab-change-log.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/whwas_admin.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/general/tab-custom-style.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/whwas_widget.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/general/top.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wphobby-ajax-search-for-woocommerce/includes/admin/sections/general/tab-general.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
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
8 plugin tags: woocommerce search by sku, woocommerce search results, woocommerce search form, ajax search, woocommerce...
wphobby-ajax-search-for-woocommerce/wphobby-woo-ajax-search.php 92% from 13 tests
"WPHobby Ajax Search for WooCommerce" version 1.0.0'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wphobby-ajax-search-for-woocommerce.php" instead of "wphobby-woo-ajax-search.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
There were no executable files found in this plugin5,905 lines of code in 26 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 8 | 1,942 | 52 | 4,660 |
PHP | 14 | 160 | 171 | 682 |
JavaScript | 2 | 152 | 4 | 385 |
SVG | 2 | 1 | 3 | 178 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 11.20 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 34 | |
▷ Static methods | 1 | 2.94% |
▷ Public methods | 34 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/admin/images/icon.png | 19.99KB | 0.88KB | ▼ 95.61% |
assets/images/play-button.png | 13.39KB | 10.70KB | ▼ 20.12% |
assets/images/file.png | 5.09KB | 3.92KB | ▼ 22.99% |
assets/images/mail.png | 16.25KB | 13.04KB | ▼ 19.74% |