Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.01MB] [CPU: ▼5.78ms] Passed 4 tests
Server-side resources used by Baidu TextCensor For Comments
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.56 ▼3.77 |
Dashboard /wp-admin | 3.31 ▲0.01 | 49.77 ▼5.82 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 48.81 ▼2.53 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 92.02 ▼7.69 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.62 ▼5.84 |
评论内容审核设置 /wp-admin/options-general.php?page=Baidu_Text_Censor | 3.20 | 31.95 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
BaiduTextCensor |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Baidu TextCensor For Comments
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.34 ▼0.01 | 1.89 ▲0.10 | 43.80 ▲0.28 |
Dashboard /wp-admin | 2,199 ▲19 | 5.54 ▼0.04 | 87.25 ▼8.37 | 43.27 ▼1.47 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.02 ▲0.05 | 40.83 ▲0.00 | 39.87 ▲5.94 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.26 ▼0.31 | 619.33 ▼25.26 | 50.44 ▼0.10 |
Media Library /wp-admin/upload.php | 1,398 ▼5 | 4.22 ▲0.06 | 97.98 ▼8.82 | 52.06 ▲2.37 |
评论内容审核设置 /wp-admin/options-general.php?page=Baidu_Text_Censor | 882 | 2.12 | 22.86 | 68.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/baidu-textcensor/wp-baidu-textcensor.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% 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
Please fix the following attributes:
- Screenshots: Screenshot #1 (screenshot-1.png) image missing
baidu-textcensor/wp-baidu-textcensor.php 92% from 13 tests
The main PHP file in "Baidu TextCensor For Comments" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("baidu-textcensor.php" instead of "wp-baidu-textcensor.php")
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
No dangerous file extensions were detected367 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 47 | 104 | 334 |
Markdown | 1 | 27 | 0 | 33 |
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.32 |
Average class complexity | 24.00 |
▷ Minimum class complexity | 24.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 30.00% |
▷ Protected methods | 3 | 30.00% |
▷ Private methods | 4 | 40.00% |
Functions | 9 | |
▷ Named functions | 9 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 228.37KB | 72.13KB | ▼ 68.42% |