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.14MB] [CPU: ▼45.90ms] Passed 4 tests
A check of server-side resources used by BJH Website Assistant
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.83 ▼0.63 | 16.90 ▼22.90 |
Dashboard /wp-admin | 2.88 ▼0.43 | 16.42 ▼34.85 |
Posts /wp-admin/edit.php | 2.88 ▼0.48 | 18.33 ▼29.88 |
Add New Post /wp-admin/post-new.php | 2.88 ▼3.01 | 17.00 ▼94.64 |
Media Library /wp-admin/upload.php | 2.88 ▼0.35 | 14.18 ▼24.23 |
BJH Site Assistant /wp-admin/options-general.php?page=bjh_sa_page | 2.88 | 17.39 |
Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
bjh_sa_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by BJH Website Assistant
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲69 | 14.23 ▼0.05 | 2.05 ▼0.02 | 43.40 ▼0.29 |
Dashboard /wp-admin | 2,202 ▲25 | 5.52 ▼0.13 | 85.42 ▼3.87 | 40.49 ▼1.04 |
Posts /wp-admin/edit.php | 2,113 ▲13 | 1.97 ▲0.01 | 39.49 ▲3.56 | 37.05 ▲0.79 |
Add New Post /wp-admin/post-new.php | 1,535 ▲1 | 22.97 ▲4.73 | 695.69 ▲5.49 | 56.14 ▼14.50 |
Media Library /wp-admin/upload.php | 1,410 ▲13 | 4.26 ▲0.08 | 95.33 ▼37.80 | 42.63 ▼3.90 |
BJH Site Assistant /wp-admin/options-general.php?page=bjh_sa_page | 922 | 2.15 | 22.60 | 29.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+45
Undefined index: bsa_font
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
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/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+26
Undefined index: bsa_font
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+26
Undefined index: bsa_avatar
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+45
Undefined index: bsa_baidu_submit
- > GET request to /wp-admin/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+51
Undefined index: bsa_baidu_token
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+45
Undefined index: bsa_head_script
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=bjh_sa_page
- > Notice in wp-content/plugins/bjh-site-assistant/inc/util.php+45
Undefined index: bsa_copyright
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
Almost there! Just fix the following items
- 34× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
require_once(BSA_PATHinc/constants.php): failed to open stream: No such file or directory in wp-content/plugins/bjh-site-assistant/inc/util.php on line 2
- > PHP Warning
require_once(BSA_PATHinc/util.php): failed to open stream: No such file or directory in wp-content/plugins/bjh-site-assistant/func/bjh-head-script.php on line 2
- > PHP Warning
require_once(BSA_PATHinc/constants.php): failed to open stream: No such file or directory in wp-content/plugins/bjh-site-assistant/settings.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'BSA_PATHinc/util.php' (include_path='.:/usr/share/php') in wp-content/plugins/bjh-site-assistant/func/bjh-meta.php on line 2
- > PHP Warning
Use of undefined constant BSA_PATH - assumed 'BSA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bjh-site-assistant/func/bjh-font.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'BSA_PATHinc/util.php' (include_path='.:/usr/share/php') in wp-content/plugins/bjh-site-assistant/func/bjh-copyright.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'BSA_PATHinc/constants.php' (include_path='.:/usr/share/php') in wp-content/plugins/bjh-site-assistant/init.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'BSA_PATHinc/util.php' (include_path='.:/usr/share/php') in wp-content/plugins/bjh-site-assistant/func/bjh-head-script.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'BSA_PATHinc/util.php' (include_path='.:/usr/share/php') in wp-content/plugins/bjh-site-assistant/func/bjh-captcha.php on line 2
- > PHP Warning
Use of undefined constant BSA_PATH - assumed 'BSA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bjh-site-assistant/settings.php on line 2
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 97% 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 require attention:
- Screenshots: Add an image for screenshot #1 (Enable or disable the functions by settings)
bjh-site-assistant/bjh-site-assistant.php Passed 13 tests
"BJH Website Assistant" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
The WordPress plugin that provides small functions to help your website working better.
Code Analysis Passed 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 plugin687 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 120 | 174 | 510 |
PO File | 1 | 22 | 22 | 66 |
Markdown | 1 | 29 | 0 | 65 |
JavaScript | 2 | 3 | 2 | 32 |
CSS | 2 | 1 | 1 | 14 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 4.09 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 1.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 47 | 92.16% |
▷ Public methods | 51 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 24 | |
▷ Global constants | 2 | 8.33% |
▷ Class constants | 22 | 91.67% |
▷ Public constants | 22 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
image/top.png | 1.55KB | 0.54KB | ▼ 64.90% |
image/default.png | 4.66KB | 1.76KB | ▼ 62.20% |
screenshot-1.png | 100.15KB | 27.45KB | ▼ 72.59% |