Benchmarks
Plugin footprint 65% 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.60MB] [CPU: ▼301.01ms] Passed 4 tests
An overview of server-side resources used by 腾讯云文本内容安全(TMS)
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.12 ▲0.60 | 69.40 ▲9.46 |
Dashboard /wp-admin | 4.04 ▲0.63 | 47.38 ▲9.80 |
Posts /wp-admin/edit.php | 4.27 ▲0.62 | 46.69 ▲0.81 |
Add New Post /wp-admin/post-new.php | 7.51 ▲0.53 | 104.39 ▼1,211.38 |
Media Library /wp-admin/upload.php | 3.93 ▲0.63 | 30.14 ▼2.92 |
文本内容安全 /wp-admin/admin.php?page=TencentWordpressTMSSettingPage | 3.90 | 33.66 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 3.90 | 34.14 |
Server storage [IO: ▲2.56MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 509 new files
Database: 2 new tables, 1 new option
New tables |
---|
wp_tencent_wordpress_tms_keyword_records |
wp_tencent_wordpress_options |
New WordPress options |
---|
tencent_wordpress_common_options |
Browser metrics Passed 4 tests
Checking browser requirements for 腾讯云文本内容安全(TMS)
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,839 ▲95 | 16.10 ▲0.40 | 6.49 ▼1.00 | 2.56 ▲0.16 |
Dashboard /wp-admin | 2,932 ▲71 | 6.23 ▲0.01 | 118.71 ▼16.60 | 178.84 ▲16.07 |
Posts /wp-admin/edit.php | 2,731 ▲40 | 3.27 ▲0.03 | 62.75 ▼1.49 | 146.00 ▲3.83 |
Add New Post /wp-admin/post-new.php | 1,687 ▼86 | 17.06 ▼4.41 | 384.09 ▼65.93 | 160.79 ▲2.81 |
Media Library /wp-admin/upload.php | 1,741 ▲43 | 5.60 ▲0.06 | 145.45 ▼0.36 | 199.28 ▲9.58 |
文本内容安全 /wp-admin/admin.php?page=TencentWordpressTMSSettingPage | 1,513 | 2.74 | 57.39 | 241.23 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 1,331 | 2.72 | 57.68 | 152.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- The uninstall procedure failed, leaving 1 table in the database
- wp_tencent_wordpress_options
- Zombie WordPress options were found after uninstall: 1 option
- tencent_wordpress_common_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check 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 | 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
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/tencentcloud-tms/common/tencent-wordpress-plugins-setting-page.php
- 361× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
require_once(): Failed opening required 'QCLOUDAPI_ROOT_PATH/Module/Base.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Feecenter.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Ms/V20180408/Models/DescribeUserBaseInfoInstanceResponse.php:32
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Ms/V20180408/Models/CreateResourceInstancesRequest.php:32
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/PhoneDetect.php:36
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/CreateTextSampleResponse.php:34
- > PHP Fatal error
require_once(): Failed opening required 'QCLOUDAPI_ROOT_PATH/Module/Base.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Vod.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'QCLOUDAPI_ROOT_PATH/Common/Sign.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Common/Request.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/CustomResult.php:30
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/common/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Ms/V20180408/Models/DeleteShieldInstancesResponse.php:28
- > PHP Fatal error
Uncaught Error: Class 'TencentCloud\\Common\\AbstractModel' not found in wp-content/plugins/tencentcloud-tms/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/DescribeFileSampleRequest.php:34
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: tencent cloud, tms, qcloud
tencentcloud-tms/tencentcloud-tms.php Passed 13 tests
The primary PHP file in "腾讯云文本内容安全(TMS)" version 1.0.1 is used by WordPress to initiate all plugin functionality
93 characters long description:
通过腾讯云文本内容安全服务对评论提交的文字进行内容检测和过滤。
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
No dangerous file extensions were detected28,417 lines of code in 354 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 320 | 4,589 | 14,706 | 23,659 |
Markdown | 13 | 944 | 0 | 3,159 |
JSON | 17 | 0 | 0 | 1,391 |
JavaScript | 2 | 21 | 38 | 198 |
make | 1 | 4 | 0 | 9 |
CSS | 1 | 0 | 11 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 11.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 153.00 |
Average method complexity | 2.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 21 | |
Interfaces | 43 | |
Traits | 6 | |
Classes | 356 | |
▷ Abstract classes | 6 | 1.69% |
▷ Concrete classes | 350 | 98.31% |
▷ Final classes | 27 | 7.71% |
Methods | 2,340 | |
▷ Static methods | 294 | 12.56% |
▷ Public methods | 1,957 | 83.63% |
▷ Protected methods | 17 | 0.73% |
▷ Private methods | 366 | 15.64% |
Functions | 478 | |
▷ Named functions | 214 | 44.77% |
▷ Anonymous functions | 264 | 55.23% |
Constants | 273 | |
▷ Global constants | 60 | 21.98% |
▷ Class constants | 213 | 78.02% |
▷ Public constants | 213 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin