Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼299.56ms] Passed 4 tests
Server-side resources used by 腾讯云对象存储(COS)
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.50 | 51.13 ▲31.35 |
Dashboard /wp-admin | 3.46 ▲0.05 | 34.85 ▲0.14 |
Posts /wp-admin/edit.php | 3.68 ▲0.05 | 39.19 ▼0.09 |
Add New Post /wp-admin/post-new.php | 6.99 ▲0.02 | 91.28 ▼1,198.60 |
Media Library /wp-admin/upload.php | 3.41 ▲0.11 | 26.34 ▲0.31 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 3.32 | 28.05 |
对象存储 /wp-admin/admin.php?page=tencent_wordpress_plugin_cos | 3.53 | 24.34 |
Server storage [IO: ▲3.37MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 614 new files
Database: 1 new table, 2 new options
New tables |
---|
wp_tencent_wordpress_options |
New WordPress options |
---|
tencent_wordpress_common_options |
tencent_wordpress_cos_options |
Browser metrics Passed 4 tests
Checking browser requirements for 腾讯云对象存储(COS)
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,818 ▲65 | 15.75 ▲0.08 | 6.39 ▼0.21 | 2.71 ▼0.19 |
Dashboard /wp-admin | 2,915 ▲60 | 6.06 ▼0.17 | 119.29 ▼17.99 | 176.95 ▲17.74 |
Posts /wp-admin/edit.php | 2,725 ▲37 | 3.26 ▲0.03 | 63.70 ▲0.34 | 151.11 ▲9.67 |
Add New Post /wp-admin/post-new.php | 1,692 ▼25 | 19.29 ▼2.09 | 383.21 ▼72.43 | 158.63 ▼1.78 |
Media Library /wp-admin/upload.php | 1,750 ▲52 | 5.57 ▲0.07 | 135.95 ▼7.10 | 213.00 ▲24.60 |
腾讯云设置 /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage | 1,328 | 2.57 | 58.98 | 194.71 |
对象存储 /wp-admin/admin.php?page=tencent_wordpress_plugin_cos | 1,983 | 2.87 | 59.88 | 194.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/tencentcloud-cos/uninstall.php+32
Undefined index: upload_url_path
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_tencent_wordpress_options
- This plugin did not uninstall successfully, leaving 1 option in the database
- tencent_wordpress_common_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=TencentWordpressPluginsCommonSettingPage
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
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
Almost there! Just fix the following items
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/tencentcloud-cos/tencentcloud-plugin-cos-setting-page.php
- > /wp-content/plugins/tencentcloud-cos/tencentcloud-cos.php
- > /wp-content/plugins/tencentcloud-cos/common/tencent-wordpress-plugins-setting-page.php
- 465× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\ResponseLocation\\AbstractLocation' not found in wp-content/plugins/tencentcloud-cos/includes/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/BodyLocation.php:11
- > 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-cos/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Common/Request.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-cos/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Cdn.php on line 2
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/tencentcloud-cos/common/vendor/guzzlehttp/promises/src/FulfilledPromise.php:10
- > PHP Warning
require_once(QCLOUDAPI_ROOT_PATH/Common/Sign.php): failed to open stream: No such file or directory in wp-content/plugins/tencentcloud-cos/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Common/Request.php on line 2
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/tencentcloud-cos/includes/vendor/qcloud/cos-sdk-v5/sample/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/tencentcloud-cos/includes/vendor/qcloud/cos-sdk-v5/sample/getBucketLifecycle.php on line 3
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/tencentcloud-cos/common/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
- > 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-cos/common/vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/Module/Scaling.php on line 2
- > PHP Warning
require(wp-content/plugins/tencentcloud-cos/includes/vendor/qcloud/cos-sdk-v5/sample/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/tencentcloud-cos/includes/vendor/qcloud/cos-sdk-v5/sample/listBucket.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/tencentcloud-cos/includes/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
- > 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 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
These attributes need to be fixed:
- Requires php: The plugin version is formatted incorrectly
tencentcloud-cos/tencentcloud-cos.php 92% from 13 tests
The main PHP file in "腾讯云对象存储(COS)" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin45,451 lines of code in 451 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 399 | 5,418 | 14,843 | 37,798 |
Markdown | 22 | 1,859 | 0 | 5,666 |
JSON | 19 | 0 | 0 | 1,597 |
JavaScript | 1 | 38 | 16 | 288 |
YAML | 2 | 7 | 0 | 33 |
XML | 2 | 0 | 0 | 29 |
make | 2 | 9 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
HTML | 1 | 1 | 0 | 9 |
CSS | 2 | 0 | 26 | 2 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 11.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 153.00 |
Average method complexity | 2.73 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 35 | |
Interfaces | 51 | |
Traits | 7 | |
Classes | 378 | |
▷ Abstract classes | 6 | 1.59% |
▷ Concrete classes | 372 | 98.41% |
▷ Final classes | 27 | 7.26% |
Methods | 2,753 | |
▷ Static methods | 337 | 12.24% |
▷ Public methods | 2,317 | 84.16% |
▷ Protected methods | 44 | 1.60% |
▷ Private methods | 392 | 14.24% |
Functions | 502 | |
▷ Named functions | 216 | 43.03% |
▷ Anonymous functions | 286 | 56.97% |
Constants | 282 | |
▷ Global constants | 68 | 24.11% |
▷ Class constants | 214 | 75.89% |
▷ Public constants | 214 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin