Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.51MB] [CPU: ▼288.53ms] Passed 4 tests
A check of server-side resources used by 腾讯云图片内容安全(IMS)
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.05 ▲0.54 | 57.45 ▲7.91 |
Dashboard /wp-admin | 3.90 ▲0.50 | 37.19 ▲4.81 |
Posts /wp-admin/edit.php | 4.19 ▲0.55 | 41.16 ▲5.71 |
Add New Post /wp-admin/post-new.php | 7.46 ▲0.46 | 96.61 ▼1,165.84 |
Media Library /wp-admin/upload.php | 3.84 ▲0.55 | 25.67 ▲1.19 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 3.82 | 26.20 |
图片内容安全 /wp-admin/admin.php?page=TencentWordpressIMSSettingPage | 3.82 | 26.68 |
Server storage [IO: ▲2.56MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 511 new files
Database: 1 new table, 1 new option
New tables |
---|
wp_tencent_wordpress_options |
New WordPress options |
---|
tencent_wordpress_common_options |
Browser metrics Passed 4 tests
Checking browser requirements for 腾讯云图片内容安全(IMS)
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,808 ▲54 | 15.98 ▲0.32 | 5.79 ▼0.30 | 2.03 ▼0.82 |
Dashboard /wp-admin | 2,928 ▲67 | 6.30 ▲0.11 | 115.21 ▼22.28 | 175.11 ▲18.29 |
Posts /wp-admin/edit.php | 2,731 ▲46 | 3.25 ▲0.01 | 64.60 ▲1.15 | 151.61 ▲11.09 |
Add New Post /wp-admin/post-new.php | 1,687 ▼24 | 17.14 ▼3.64 | 415.49 ▼30.31 | 153.93 ▼2.43 |
Media Library /wp-admin/upload.php | 1,735 ▲40 | 5.57 ▲0.06 | 135.31 ▼5.68 | 205.26 ▲17.35 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 1,334 | 2.72 | 55.10 | 161.56 |
图片内容安全 /wp-admin/admin.php?page=TencentWordpressIMSSettingPage | 1,246 | 2.62 | 58.11 | 170.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Zombie tables detected upon uninstall: 1 table
- 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 short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/tencentcloud-ims/common/tencent-wordpress-plugins-setting-page.php
- 361× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/vendor/GuzzleHttp/Psr7/Uri.php:13
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/tencentcloud-ims/common/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
- > PHP Warning
require_once(QCLOUDAPI_ROOT_PATH/Module/Base.php): failed to open stream: No such file or directory in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Account.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'TENCENT_WORDPRESS_PLUGINS_COMMON_DIRtencent-wordpress-plugins-setting-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-ims/common/TencentWordpressPluginsSettingActions.php on line 18
- > PHP Warning
require_once(QCLOUDAPI_ROOT_PATH/Module/Base.php): failed to open stream: No such file or directory in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Cloudaudit.php on line 2
- > PHP Warning
Use of undefined constant QCLOUDAPI_ROOT_PATH - assumed 'QCLOUDAPI_ROOT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Tmt.php on line 2
- > PHP Warning
require_once(QCLOUDAPI_ROOT_PATH/Module/Base.php): failed to open stream: No such file or directory in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Snapshot.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'QCLOUDAPI_ROOT_PATH/Module/Base.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-ims/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Bm.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-ims/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-ims/vendor/tencentcloud/tencentcloud-sdk-php/src/TencentCloud/Cms/V20190321/Models/DescribeFileSampleResponse.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 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: tencent cloud, ims, qcloud
tencentcloud-ims/tencentcloud-ims.php Passed 13 tests
"腾讯云图片内容安全(IMS)" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
108 characters long description:
通过腾讯云图片内容安全服务对媒体库上传和URL插入的图片进行内容检测和过滤。
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 detected27,918 lines of code in 353 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 320 | 4,555 | 14,655 | 23,308 |
Markdown | 13 | 944 | 0 | 3,159 |
JSON | 16 | 0 | 0 | 1,375 |
JavaScript | 2 | 3 | 38 | 66 |
make | 1 | 4 | 0 | 9 |
CSS | 1 | 0 | 11 | 1 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 11.70 |
▷ 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,327 | |
▷ Static methods | 292 | 12.55% |
▷ Public methods | 1,947 | 83.67% |
▷ Protected methods | 17 | 0.73% |
▷ Private methods | 363 | 15.60% |
Functions | 478 | |
▷ Named functions | 214 | 44.77% |
▷ Anonymous functions | 264 | 55.23% |
Constants | 269 | |
▷ Global constants | 60 | 22.30% |
▷ Class constants | 209 | 77.70% |
▷ Public constants | 209 | 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