Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
- Install procedure validation failed for this plugin
- > User deprecated in wp-includes/functions.php+5643
File upgrade-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/upgrade.php instead.
Server metrics [RAM: ▲0.55MB] [CPU: ▲2.70ms] Passed 4 tests
Server-side resources used by WP-QINIU (WordPress连接到七牛云存储)
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.06 ▲0.60 | 47.21 ▲7.88 |
Dashboard /wp-admin | 3.89 ▲0.59 | 57.35 ▲6.97 |
Posts /wp-admin/edit.php | 3.94 ▲0.59 | 55.60 ▲6.74 |
Add New Post /wp-admin/post-new.php | 6.41 ▲0.52 | 90.76 ▼10.80 |
Media Library /wp-admin/upload.php | 3.75 ▲0.52 | 46.12 ▲10.89 |
WP-QINIU /wp-admin/options-general.php?page=wp-qiniu/wp-qiniu.php | 3.70 | 38.94 |
七牛云存储 /wp-admin/upload.php?page=wp_qiniu_storage | 3.72 | 38.80 |
Server storage [IO: ▲2.49MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 125 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_wp_qiniu_files |
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP-QINIU (WordPress连接到七牛云存储)
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,797 ▲36 | 14.28 ▼0.11 | 1.72 ▼0.19 | 42.96 ▲3.44 |
Dashboard /wp-admin | 2,200 ▲23 | 5.55 ▼0.11 | 87.63 ▼3.70 | 50.06 ▲7.66 |
Posts /wp-admin/edit.php | 2,108 ▲8 | 2.02 ▲0.05 | 37.68 ▲1.78 | 38.22 ▲1.50 |
Add New Post /wp-admin/post-new.php | 1,532 ▼5 | 23.31 ▲5.23 | 643.82 ▼8.97 | 52.70 ▼13.18 |
Media Library /wp-admin/upload.php | 1,402 ▼1 | 4.20 ▲0.05 | 103.79 ▼1.39 | 48.62 ▲2.77 |
WP-QINIU /wp-admin/options-general.php?page=wp-qiniu/wp-qiniu.php | 1,118 | 2.02 | 36.69 | 81.55 |
七牛云存储 /wp-admin/upload.php?page=wp_qiniu_storage | 866 | 2.43 | 37.00 | 37.84 |
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
- Zombie tables were found after uninstall: 1 table
- wp_wp_qiniu_files
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_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 server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=wp-qiniu/wp-qiniu.php
- > Notice in wp-content/plugins/wp-qiniu/wp-qiniu.php+416
Trying to access array offset on value of type bool
SRP 50% 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
- 11× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-qiniu/wp-qiniu-ajax.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-qiniu/wp-qiniu-backup.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-qiniu/wp-qiniu-insert-to-content.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-qiniu/wp-qiniu-debug.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-qiniu/wp-qiniu-shortcodes-audiojs-grindplayer.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-qiniu/wp-qiniu-file-manage.php:166
- > PHP Fatal error
Uncaught Error: Class 'Qiniu\\Config' not found in wp-content/plugins/wp-qiniu/lib/Qiniu/functions.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-qiniu/wp-qiniu-shortcodes.php:53
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-qiniu/wp-qiniu-shortcodes-ckplayer.php:46
- > PHP Warning
Use of undefined constant WP_QINIU_DEBUG - assumed 'WP_QINIU_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-qiniu/wp-qiniu-debug.php on line 9
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
- > GET request to /wp-admin/upload.php?page=wp_qiniu_storage
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: a(...).live is not a function" "TypeError: a(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-qiniu/js/file-manage.min.js?ver=2.0.5:1:43)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/upload.php?page=wp_qiniu_storage
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: a(...).live is not a function
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: backup, sync, object cloud storage, qiniu, wp-qiniu
wp-qiniu/wp-qiniu.php 92% from 13 tests
Analyzing the main PHP file in "WP-QINIU (WordPress连接到七牛云存储)" version 2.0.5
It is important to fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 750 characters long)
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
Everything looks great! No dangerous files found in this plugin11,558 lines of code in 107 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 63 | 721 | 2,080 | 5,749 |
PHP | 29 | 569 | 1,086 | 4,327 |
CSS | 14 | 14 | 37 | 1,368 |
SVG | 1 | 0 | 0 | 114 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 12.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 41.00 |
Average method complexity | 2.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 17 | 100.00% |
▷ Final classes | 16 | 94.12% |
Methods | 134 | |
▷ Static methods | 37 | 27.61% |
▷ Public methods | 101 | 75.37% |
▷ Protected methods | 2 | 1.49% |
▷ Private methods | 31 | 23.13% |
Functions | 94 | |
▷ Named functions | 94 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 27 | |
▷ Global constants | 19 | 70.37% |
▷ Class constants | 8 | 29.63% |
▷ Public constants | 8 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.84MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/cancel.png | 1.92KB | 0.79KB | ▼ 58.81% |
screenshot-1.png | 146.69KB | 42.30KB | ▼ 71.16% |
img/dir.png | 8.46KB | 3.64KB | ▼ 56.96% |
screenshot-3.png | 145.24KB | 41.34KB | ▼ 71.54% |
img/audio.png | 9.36KB | 4.14KB | ▼ 55.78% |