Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.15MB] [CPU: ▼8.24ms] Passed 4 tests
A check of server-side resources used by WPQiNiu七牛云对象存储
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 42.21 ▼0.05 |
Dashboard /wp-admin | 3.46 ▲0.12 | 47.73 ▼13.47 |
Posts /wp-admin/edit.php | 3.58 ▲0.22 | 51.78 ▲5.50 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 90.04 ▼20.39 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 37.32 ▲0.96 |
七牛云存储设置 /wp-admin/options-general.php?page=wpqiniu/index.php | 3.39 | 31.16 |
Server storage [IO: ▲1.94MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 126 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
wpqiniu_options |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WPQiNiu七牛云对象存储
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲7 | 14.38 ▲0.01 | 1.66 ▼0.51 | 44.28 ▲0.61 |
Dashboard /wp-admin | 2,202 ▲25 | 5.63 ▼0.07 | 85.92 ▼12.03 | 42.73 ▼3.25 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.06 ▲0.02 | 42.54 ▲5.14 | 41.10 ▲8.69 |
Add New Post /wp-admin/post-new.php | 1,551 ▲25 | 23.43 ▲5.89 | 680.47 ▼0.02 | 56.04 ▼2.46 |
Media Library /wp-admin/upload.php | 1,398 ▲1 | 4.25 ▲0.02 | 98.76 ▼4.60 | 46.76 ▲2.11 |
七牛云存储设置 /wp-admin/options-general.php?page=wpqiniu/index.php | 1,272 | 1.84 | 37.32 | 137.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
- 43× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_batch_change_type.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_batch_stat.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_batch_delete.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_copy.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_download_urls.php
- > /wp-content/plugins/wpqiniu/sdk/examples/cdn_timestamp_antileech.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_batch_change_mime.php
- > /wp-content/plugins/wpqiniu/sdk/examples/rs_delete_after_days.php
- > /wp-content/plugins/wpqiniu/sdk/examples/cdn_refresh_urls_dirs.php
- > /wp-content/plugins/wpqiniu/sdk/examples/pfop_watermark.php
- 46× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
array_key_exists() expects parameter 2 to be array, bool given in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Auth.php on line 41
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpqiniu/sdk/tests/Qiniu/Tests/FopTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpqiniu/sdk/tests/Qiniu/Tests/CdnManagerTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'Qiniu\\Config' not found in wp-content/plugins/wpqiniu/sdk/src/Qiniu/functions.php:8
- > PHP Notice
Trying to get property 'srcUpHosts' of non-object in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Config.php on line 45
- > PHP Notice
Undefined variable: maxUsers in wp-content/plugins/wpqiniu/sdk/docs/rtc/example.php on line 23
- > PHP Warning
array_key_exists() expects parameter 2 to be array, bool given in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Auth.php on line 38
- > PHP Warning
array_key_exists() expects parameter 2 to be array, bool given in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Auth.php on line 38
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Config.php on line 45
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/wpqiniu/sdk/src/Qiniu/Config.php on line 45
- > PHP Warning
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 93% from 29 tests
readme.txt Passed 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
1 plugin tags: wordpress
wpqiniu/index.php 85% from 13 tests
The main file in "WPQiNiu七牛云对象存储" v. 4.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Description: The description should be shorter than 140 characters (currently 186 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("wpqiniu.php" instead of "index.php")
Code Analysis Passed 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 plugin5,163 lines of code in 108 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 85 | 897 | 1,108 | 4,637 |
Markdown | 5 | 77 | 0 | 214 |
SVG | 1 | 356 | 3 | 195 |
YAML | 2 | 4 | 0 | 54 |
JSON | 1 | 0 | 0 | 26 |
XML | 1 | 1 | 0 | 18 |
JavaScript | 6 | 0 | 5 | 9 |
CSS | 6 | 0 | 4 | 6 |
Bourne Shell | 1 | 0 | 0 | 4 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
Average class complexity | 8.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 49.00 |
Average method complexity | 2.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 34 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 34 | 100.00% |
▷ Final classes | 17 | 50.00% |
Methods | 226 | |
▷ Static methods | 39 | 17.26% |
▷ Public methods | 178 | 78.76% |
▷ Protected methods | 7 | 3.10% |
▷ Private methods | 41 | 18.14% |
Functions | 15 | |
▷ Named functions | 14 | 93.33% |
▷ Anonymous functions | 1 | 6.67% |
Constants | 10 | |
▷ Global constants | 1 | 10.00% |
▷ Class constants | 9 | 90.00% |
▷ Public constants | 9 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.20MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
layui/images/logo.png | 24.44KB | 0.95KB | ▼ 96.10% |
layui/css/modules/layer/default/icon.png | 11.22KB | 4.36KB | ▼ 61.19% |
sdk/examples/php-logo.png | 63.54KB | 23.27KB | ▼ 63.37% |
layui/css/modules/layer/default/icon-ext.png | 5.77KB | 2.91KB | ▼ 49.62% |
layui/images/footer_logo.png | 24.87KB | 0.95KB | ▼ 96.18% |