Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼3.86ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Ajax Search
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 38.71 ▼1.89 |
Dashboard /wp-admin | 3.38 ▲0.08 | 45.20 ▼5.54 |
Posts /wp-admin/edit.php | 3.50 ▲0.14 | 42.26 ▼4.10 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 86.91 ▼3.91 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 36.28 ▲4.37 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce Ajax Search
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.44 ▲0.08 | 1.82 ▲0.04 | 43.30 ▼0.15 |
Dashboard /wp-admin | 2,206 ▲24 | 5.91 ▲1.05 | 117.34 ▲13.91 | 41.61 ▼0.76 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.03 ▲0.02 | 34.33 ▲0.50 | 33.19 ▼0.77 |
Add New Post /wp-admin/post-new.php | 1,534 ▼0 | 22.85 ▼0.33 | 613.65 ▼67.79 | 56.94 ▼10.67 |
Media Library /wp-admin/upload.php | 1,391 ▲3 | 4.19 ▼0.04 | 97.34 ▼0.36 | 41.14 ▼2.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 8× PHP files trigger errors when accessed directly with GET requests:
- > PHP Notice
Undefined variable: product in wp-content/plugins/codja-wc-ajax-search/templates/product.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/codja-wc-ajax-search/templates/admin/settings_page.php:6
- > PHP Warning
Use of undefined constant CJ_WC_AJAX_SEARCH_URL - assumed 'CJ_WC_AJAX_SEARCH_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/codja-wc-ajax-search/templates/admin/settings_page.php on line 3
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/codja-wc-ajax-search/templates/remove_button.php:2
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/codja-wc-ajax-search/templates/product.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/codja-wc-ajax-search/templates/product.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/codja-wc-ajax-search/templates/no_products.php:1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/codja-wc-ajax-search/templates/add_button.php:2
- > PHP Notice
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 87% from 29 tests
readme.txt 88% from 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
These attributes need your attention:
- Requires php: Version format is invalid
- Tags: Too many tags (50 tag instead of maximum 10); only the first 5 tags are used in your directory listing
codja-wc-ajax-search/cj-wc-ajax-search.php 85% from 13 tests
The primary PHP file in "WooCommerce Ajax Search" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("codja-wc-ajax-search.php" instead of "cj-wc-ajax-search.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,090 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 120 | 96 | 494 |
CSS | 3 | 55 | 0 | 321 |
JavaScript | 2 | 44 | 5 | 196 |
PO File | 1 | 30 | 31 | 79 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 65.00 |
▷ Minimum class complexity | 65.00 |
▷ Maximum class complexity | 65.00 |
Average method complexity | 3.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 26 | |
▷ Static methods | 4 | 15.38% |
▷ Public methods | 14 | 53.85% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 46.15% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/search.png | 0.81KB | 0.56KB | ▼ 30.75% |
public/images/plugin_image.png | 29.42KB | 9.18KB | ▼ 68.78% |