Benchmarks
Plugin footprint 83% 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.02MB] [CPU: ▼1.35ms] Passed 4 tests
An overview of server-side resources used by OSS Aliyun
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 39.20 ▲3.48 |
Dashboard /wp-admin | 3.32 ▲0.02 | 46.57 ▼0.70 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 42.66 ▲0.57 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 78.56 ▼6.56 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 38.23 ▲1.29 |
阿里云 OSS /wp-admin/options-general.php?page=oss-aliyun/aliyun-oss-wordpress.php | 3.21 | 27.13 |
Server storage [IO: ▲2.23MB] [DB: ▲0.07MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 361 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
oss_options |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for OSS Aliyun
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.35 ▼0.27 | 1.85 ▲0.21 | 43.73 ▲1.22 |
Dashboard /wp-admin | 2,193 ▲13 | 5.63 ▼0.04 | 93.63 ▲7.73 | 45.03 ▲5.32 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▼0.01 | 35.19 ▲2.78 | 37.10 ▼2.99 |
Add New Post /wp-admin/post-new.php | 1,529 ▼8 | 23.55 ▲5.02 | 626.75 ▼24.59 | 50.93 ▼17.79 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.19 ▼0.09 | 94.21 ▼12.13 | 47.71 ▲0.83 |
阿里云 OSS /wp-admin/options-general.php?page=oss-aliyun/aliyun-oss-wordpress.php | 1,433 | 2.00 | 24.45 | 159.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 50% 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
- 143× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
require_once(wp-content/plugins/oss-aliyun/sdk/vendor/aliyuncs/oss-sdk-php/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/oss-aliyun/sdk/vendor/aliyuncs/oss-sdk-php/index.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/oss-aliyun/sdk/vendor/guzzlehttp/promises/src/AggregateException.php:8
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/oss-aliyun/sdk/vendor/guzzlehttp/promises/src/EachPromise.php:9
- > PHP Fatal error
Uncaught Error: Class 'AlibabaCloud\\Credentials\\Providers\\Provider' not found in wp-content/plugins/oss-aliyun/sdk/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php:11
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/oss-aliyun/sdk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
- > PHP Fatal error
Uncaught Error: Class 'AlibabaCloud\\Credentials\\Request\\Request' not found in wp-content/plugins/oss-aliyun/sdk/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php:12
- > PHP Fatal error
Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/oss-aliyun/sdk/vendor/aliyuncs/oss-sdk-php/src/OSS/Result/GetBucketStatResult.php:12
- > PHP Fatal error
Uncaught Error: Interface 'OSS\\Model\\XmlConfig' not found in wp-content/plugins/oss-aliyun/sdk/vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RequestPaymentConfig.php:14
- > PHP Fatal error
Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/oss-aliyun/sdk/vendor/aliyuncs/oss-sdk-php/src/OSS/Result/GetLiveChannelInfoResult.php:7
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/oss-aliyun/sdk/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Screenshots: Add images for these screenshots: #1 (设置页面), #2 (数据库同步)
oss-aliyun/aliyun-oss-wordpress.php 85% from 13 tests
This is the main PHP file of "OSS Aliyun" version 1.4.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("oss-aliyun.php" instead of "aliyun-oss-wordpress.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin43,757 lines of code in 340 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 282 | 4,129 | 11,555 | 37,394 |
Markdown | 30 | 1,591 | 0 | 4,428 |
JSON | 16 | 0 | 0 | 1,769 |
YAML | 7 | 20 | 3 | 111 |
XML | 2 | 1 | 0 | 37 |
Dockerfile | 1 | 8 | 0 | 10 |
Bourne Shell | 2 | 6 | 4 | 8 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 11.79 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 242.00 |
Average method complexity | 2.69 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 28 | |
Interfaces | 20 | |
Traits | 3 | |
Classes | 221 | |
▷ Abstract classes | 3 | 1.36% |
▷ Concrete classes | 218 | 98.64% |
▷ Final classes | 25 | 11.47% |
Methods | 1,579 | |
▷ Static methods | 261 | 16.53% |
▷ Public methods | 1,331 | 84.29% |
▷ Protected methods | 63 | 3.99% |
▷ Private methods | 185 | 11.72% |
Functions | 196 | |
▷ Named functions | 99 | 50.51% |
▷ Anonymous functions | 97 | 49.49% |
Constants | 307 | |
▷ Global constants | 44 | 14.33% |
▷ Class constants | 263 | 85.67% |
▷ Public constants | 263 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.44MB with 0.30MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 385.12KB | 116.21KB | ▼ 69.82% |
screenshot-2.png | 61.75KB | 19.51KB | ▼ 68.41% |