Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.49MB] [CPU: ▲3.13ms] Passed 4 tests
A check of server-side resources used by JC Ajax Search for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.97 ▲0.51 | 47.91 ▲10.74 |
Dashboard /wp-admin | 3.81 ▲0.47 | 46.41 ▼5.88 |
Posts /wp-admin/edit.php | 3.87 ▲0.51 | 46.41 ▲8.50 |
Add New Post /wp-admin/post-new.php | 6.35 ▲0.47 | 89.96 ▲0.55 |
Media Library /wp-admin/upload.php | 3.74 ▲0.51 | 41.59 ▲9.36 |
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius | 3.94 | 36.28 |
Server storage [IO: ▲3.84MB] [DB: ▲0.08MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 206 new files
Database: 1 new table, 10 new options
New tables |
---|
wcjc_ajax_search_shorcode |
New WordPress options |
---|
fs_gdpr |
widget_recent-posts |
widget_recent-comments |
fs_active_plugins |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
fs_accounts |
fs_debug_mode |
Browser metrics Passed 4 tests
A check of browser resources used by JC Ajax Search for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,007 ▲246 | 13.72 ▼0.90 | 6.52 ▲4.93 | 33.71 ▼5.48 |
Dashboard /wp-admin | 2,302 ▲130 | 5.10 ▼0.50 | 88.85 ▼31.08 | 85.53 ▲37.71 |
Posts /wp-admin/edit.php | 2,210 ▲107 | 2.53 ▲0.54 | 38.78 ▼1.09 | 35.71 ▲6.23 |
Add New Post /wp-admin/post-new.php | 1,772 ▲237 | 22.83 ▼2.21 | 687.26 ▲42.51 | 30.80 ▼28.85 |
Media Library /wp-admin/upload.php | 1,501 ▲104 | 4.68 ▲0.51 | 101.92 ▲8.05 | 91.00 ▲52.27 |
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius | 1,165 | 2.25 | 29.35 | 26.35 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 25% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/jc-ajax-search-for-woocommerce/freemius/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- The uninstall procedure failed, leaving 1 table in the database
- wcjc_ajax_search_shorcode
- This plugin does not fully uninstall, leaving 10 options in the database
- can_compress_scripts
- widget_recent-comments
- fs_gdpr
- theysaidso_admin_options
- widget_theysaidso_widget
- fs_active_plugins
- db_upgraded
- widget_recent-posts
- fs_debug_mode
- fs_accounts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
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
Please take a closer look at the following
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/jc-ajax-search-for-woocommerce/admin/partials/wc-ajax-search-jc-admin-display.php
- > /wp-content/plugins/jc-ajax-search-for-woocommerce/frontend/partials/wc-ajax-search-jc-public-display.php
- 7× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jc-ajax-search-for-woocommerce/frontend/class-wc-ajax-search-jc-public.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jc-ajax-search-for-woocommerce/admin/class-wc-ajax-search-jc-admin.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jc-ajax-search-for-woocommerce/frontend/controller/wcjc-public-ajax-search.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/jc-ajax-search-for-woocommerce/admin/views/search-form-create.php:71
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jc-ajax-search-for-woocommerce/admin/controller/wcjc-admin-ajax-search.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/jc-ajax-search-for-woocommerce/admin/views/search-form-list.php:6
- > PHP Notice
Undefined variable: id in wp-content/plugins/jc-ajax-search-for-woocommerce/frontend/views/wpjc-shorcode-search-print.php on line 1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: ajax, woocommerce search ajax, woo, search, woocommerce search form...
jc-ajax-search-for-woocommerce/jc-ajax-search-for-woocommerce.php Passed 13 tests
The main PHP file in "JC Ajax Search for WooCommerce" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
139 characters long description:
JC Ajax Search for WooCommerce allows you to create search forms with different settings to search for products without refreshing the page
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin33,187 lines of code in 147 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 125 | 7,393 | 16,596 | 31,162 |
CSS | 14 | 33 | 9 | 1,421 |
JavaScript | 6 | 49 | 120 | 492 |
PO File | 1 | 33 | 33 | 86 |
SVG | 1 | 0 | 1 | 26 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 74.02 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 4.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 56 | |
▷ Abstract classes | 2 | 3.57% |
▷ Concrete classes | 54 | 96.43% |
▷ Final classes | 0 | 0.00% |
Methods | 1,177 | |
▷ Static methods | 175 | 14.87% |
▷ Public methods | 832 | 70.69% |
▷ Protected methods | 15 | 1.27% |
▷ Private methods | 330 | 28.04% |
Functions | 97 | |
▷ Named functions | 97 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 125 | |
▷ Global constants | 99 | 79.20% |
▷ Class constants | 26 | 20.80% |
▷ Public constants | 26 | 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
6 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 |
freemius/assets/img/wc-ajax-search-jc.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
assets/screenshot-1.png | 108.64KB | 28.19KB | ▼ 74.05% |
assets/icon-256x256.png | 10.34KB | 4.38KB | ▼ 57.69% |
assets/icon-128x128.png | 4.62KB | 2.37KB | ▼ 48.71% |