Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼3.66ms] Passed 4 tests
An overview of server-side resources used by 腾讯云 T-Sec 天御
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 38.85 ▲0.72 |
Dashboard /wp-admin | 3.31 ▲0.01 | 42.94 ▼10.61 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 48.47 ▲0.76 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 87.51 ▼5.52 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 46.12 ▲13.39 |
Server storage [IO: ▲1.61MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 175 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
censor_options |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
腾讯云 T-Sec 天御: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲59 | 14.45 ▲0.16 | 1.62 ▼0.35 | 41.62 ▼1.40 |
Dashboard /wp-admin | 2,222 ▲34 | 4.85 ▼0.03 | 107.78 ▼4.15 | 45.15 ▼0.09 |
Posts /wp-admin/edit.php | 2,105 ▲13 | 2.00 ▲0.02 | 39.04 ▼3.19 | 40.58 ▲2.49 |
Add New Post /wp-admin/post-new.php | 1,547 ▲30 | 23.07 ▲5.56 | 591.43 ▼17.90 | 56.92 ▼2.91 |
Media Library /wp-admin/upload.php | 1,407 ▲19 | 4.21 ▼0.09 | 94.89 ▼2.68 | 47.86 ▲7.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/text-moderation-system/censor.php
- 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/promises/src/AggregateException.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/psr7/src/Request.php:12
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/text-moderation-system/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/ImageData.php:60
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/text-moderation-system/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/text-moderation-system/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/FileSampleInfo.php:66
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/text-moderation-system/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/Filter.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/text-moderation-system/censor_actions.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: censor, t-sec, spam
text-moderation-system/censor.php 85% from 13 tests
The main file in "腾讯云 T-Sec 天御" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 205 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("text-moderation-system.php" instead of "censor.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin28,627 lines of code in 165 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Markdown | 11 | 11,753 | 0 | 17,577 |
PHP | 144 | 2,200 | 7,507 | 10,430 |
JSON | 8 | 0 | 0 | 601 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 11.98 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 84.00 |
Average method complexity | 2.89 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 15 | |
Traits | 2 | |
Classes | 111 | |
▷ Abstract classes | 2 | 1.80% |
▷ Concrete classes | 109 | 98.20% |
▷ Final classes | 9 | 8.26% |
Methods | 783 | |
▷ Static methods | 69 | 8.81% |
▷ Public methods | 650 | 83.01% |
▷ Protected methods | 5 | 0.64% |
▷ Private methods | 128 | 16.35% |
Functions | 152 | |
▷ Named functions | 65 | 42.76% |
▷ Anonymous functions | 87 | 57.24% |
Constants | 57 | |
▷ Global constants | 2 | 3.51% |
▷ Class constants | 55 | 96.49% |
▷ Public constants | 55 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin