Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼1.62MB] [CPU: ▼46.96ms] Passed 4 tests
An overview of server-side resources used by WPCS ( Wordpress Custom Search )
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.37 ▼1.10 | 8.26 ▼29.75 |
Dashboard /wp-admin | 2.38 ▼0.92 | 11.01 ▼36.16 |
Posts /wp-admin/edit.php | 2.38 ▼0.97 | 11.54 ▼36.67 |
Add New Post /wp-admin/post-new.php | 2.38 ▼3.51 | 11.63 ▼85.25 |
Media Library /wp-admin/upload.php | 2.38 ▼0.85 | 12.55 ▼23.67 |
WPCS /wp-admin/admin.php?page=wpcs-overview | 2.38 | 11.82 |
Settings /wp-admin/admin.php?page=wpcs-settings | 2.38 | 11.12 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 25 new options
New WordPress options |
---|
wpcs_hide_uncat |
wpcs_excerpt_length_widget |
widget_wpcs_search_widget |
wpcs_postno_widget |
wpcs_text_color |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
wpcs_search_button |
wpcs_search_field |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WPCS ( Wordpress Custom Search )
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲59 | 14.47 ▲0.07 | 2.02 ▲0.31 | 38.52 ▼2.19 |
Dashboard /wp-admin | 2,232 ▲44 | 5.08 ▲0.20 | 97.73 ▼3.93 | 78.19 ▲33.16 |
Posts /wp-admin/edit.php | 2,115 ▲23 | 2.02 ▼0.00 | 38.06 ▼2.91 | 35.24 ▼0.79 |
Add New Post /wp-admin/post-new.php | 1,689 ▲146 | 22.54 ▲4.26 | 640.98 ▼2.40 | 54.44 ▼11.00 |
Media Library /wp-admin/upload.php | 1,408 ▲20 | 4.24 ▲0.06 | 100.06 ▲3.21 | 72.79 ▲28.39 |
WPCS /wp-admin/admin.php?page=wpcs-overview | 819 | 2.01 | 22.93 | 48.81 |
Settings /wp-admin/admin.php?page=wpcs-settings | 1,370 | 1.79 | 30.21 | 34.60 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Uninstall procedure had uncaught errors
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in wpcs_search_Widget is deprecated since version 4.3.0! Use __construct() instead.
- This plugin did not uninstall successfully, leaving 25 options in the database
- wpcs_thnumbnail_widget
- wpcs_hide_empty
- wpcs_excerpt_length_widget
- wpcs_postno_widget
- widget_recent-posts
- wpcs_search_field
- wpcs_hide_uncat
- widget_wpcs_most_view_widget
- wpcs_button_color
- wpcs_search_button
- ...
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcs-settings
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in wpcs_search_Widget is deprecated since version 4.3.0! Use __construct() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wpcs-settings
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in wpcs_most_view_Widget is deprecated since version 4.3.0! Use __construct() instead.
SRP 50% 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
Almost there! Just fix the following items
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wpcs-wp-custom-search/main.php:31
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpcs-wp-custom-search/register_setting.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpcs-wp-custom-search/wpcs_widgets.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpcs-wp-custom-search/overview.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpcs-wp-custom-search/shortcode.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpcs-wp-custom-search/setting.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Tags: Please delete some tags, you are using 32 tag instead of maximum 10
wpcs-wp-custom-search/main.php 92% from 13 tests
Analyzing the main PHP file in "WPCS ( Wordpress Custom Search )" version 1.1
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpcs-wp-custom-search.php" instead of "main.php")
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
Good job! No executable or dangerous file extensions detected1,300 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 1 | 139 | 38 | 833 |
PHP | 6 | 53 | 12 | 356 |
CSS | 1 | 17 | 0 | 111 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 17.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 5.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
8 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/prev.png | 1.33KB | 1.59KB | 0.00% |
img/next.png | 1.32KB | 1.58KB | 0.00% |
img/wpcs-icon.png | 0.53KB | 0.62KB | 0.00% |
img/close.png | 0.27KB | 0.29KB | 0.00% |
img/wpcs_screenshot.png | 36.34KB | 12.60KB | ▼ 65.32% |