Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/qiniu-uploader/qiniu-uploader.php+65
Methods with the same name as their class will not be constructors in a future version of PHP; qiniu_uploader has a deprecated constructor
Server metrics [RAM: ▼1.84MB] [CPU: ▼202.14ms] Passed 4 tests
A check of server-side resources used by Qiniu Uploader
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.79 ▼0.93 | 6.68 ▼15.58 |
Dashboard /wp-admin | 1.81 ▼1.24 | 5.46 ▼44.61 |
Posts /wp-admin/edit.php | 1.81 ▼1.29 | 4.68 ▼35.72 |
Add New Post /wp-admin/post-new.php | 1.81 ▼3.62 | 4.44 ▼700.47 |
Media Library /wp-admin/upload.php | 1.81 ▼1.19 | 5.42 ▼27.77 |
七牛云储存 /wp-admin/upload.php?page=qiniu-image | 1.81 | 5.36 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: 1 new table, 1 new option
New tables |
---|
wp_qiniu |
New WordPress options |
---|
qiniu_db_version |
Browser metrics Passed 4 tests
A check of browser resources used by Qiniu Uploader
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,686 ▲90 | 15.95 ▲0.36 | 7.47 ▼2.46 | 48.75 ▲1.55 |
Dashboard /wp-admin | 2,981 ▲47 | 5.88 ▼0.07 | 140.87 ▼5.55 | 131.50 ▲16.46 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.69 ▲0.00 | 64.95 ▼2.10 | 95.99 ▼4.97 |
Add New Post /wp-admin/post-new.php | 1,689 ▲189 | 18.50 ▼0.07 | 350.72 ▼15.88 | 112.38 ▲4.21 |
Media Library /wp-admin/upload.php | 1,814 ▲7 | 5.00 ▲0.01 | 157.96 ▲6.23 | 129.39 ▲4.60 |
七牛云储存 /wp-admin/upload.php?page=qiniu-image | 995 | 2.09 | 53.27 | 67.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/qiniu-uploader/qiniu-uploader.php+65
Methods with the same name as their class will not be constructors in a future version of PHP; qiniu_uploader has a deprecated constructor
- Zombie tables were found after uninstall: 1 table
- wp_qiniu
- Zombie WordPress options were found after uninstall: 1 option
- qiniu_db_version
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- > GET request to /wp-admin/upload.php?page=qiniu-image
- > Deprecated in wp-content/plugins/qiniu-uploader/qiniu-uploader.php+65
Methods with the same name as their class will not be constructors in a future version of PHP; qiniu_uploader has a deprecated constructor
- > GET request to /wp-admin/upload.php?page=qiniu-image
- > Deprecated in wp-content/plugins/qiniu-uploader/qiniu-uploader.php+90
Function create_function() is deprecated
- > GET request to /wp-admin/upload.php?page=qiniu-image
- > Deprecated in wp-content/plugins/qiniu-uploader/tinymce/tinymce.php+3
Methods with the same name as their class will not be constructors in a future version of PHP; add_qiniu_button has a deprecated constructor
- > GET request to /wp-admin/upload.php?page=qiniu-image
- > Notice in wp-content/plugins/qiniu-uploader/lib/config.php+3
Constant DOMAIN already defined
- > GET request to /wp-admin/upload.php?page=qiniu-image
- > Notice in wp-content/plugins/qiniu-uploader/lib/config.php+4
Constant HOST already defined
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
Please fix the following
- 5× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/qiniu-uploader/upload_window.php
- > /wp-content/plugins/qiniu-uploader/lib/qiniu/qbox/eu_demo.php
- > /wp-content/plugins/qiniu-uploader/lib/qiniu/qbox/rs_demo.php
- > /wp-content/plugins/qiniu-uploader/lib/qiniu/qbox/fileop_demo.php
- > /wp-content/plugins/qiniu-uploader/lib/qiniu/qbox/authtoken_demo.php
- 13× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
Use of undefined constant qiniu_URLPATH - assumed 'qiniu_URLPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/qiniu-uploader/upload_window.php on line 4
- > PHP Warning
Use of undefined constant qiniu_URLPATH - assumed 'qiniu_URLPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/qiniu-uploader/upload_window.php on line 65
- > PHP Fatal error
require_once(): Failed opening required 'qiniu_ABSPATH/lib/config.php' (include_path='.:/usr/share/php') in wp-content/plugins/qiniu-uploader/bootstrap.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/qiniu-uploader/tinymce/tinymce.php:9
- > PHP Warning
Use of undefined constant QBOX_UP_HOST - assumed 'QBOX_UP_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/qiniu-uploader/upload_window.php on line 48
- > PHP Notice
Undefined variable: nonce in wp-content/plugins/qiniu-uploader/upload_window.php on line 10
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qiniu-uploader/qiniu-uploader.php on line 19
- > PHP Warning
Use of undefined constant qiniu_URLPATH - assumed 'qiniu_URLPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/qiniu-uploader/upload_window.php on line 12
- > PHP Notice
Undefined variable: upToken in wp-content/plugins/qiniu-uploader/upload_window.php on line 9
- > PHP Warning
require_once(qiniu_ABSPATH/lib/config.php): failed to open stream: No such file or directory in wp-content/plugins/qiniu-uploader/bootstrap.php on line 7
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: download, qiniu, storage, post, upload...
qiniu-uploader/qiniu-uploader.php Passed 13 tests
The primary PHP file in "Qiniu Uploader" version 0.1 is used by WordPress to initiate all plugin functionality
67 characters long description:
upload image to qiniu cloud store and copy the url to current post.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,952 lines of code in 39 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 26 | 299 | 507 | 1,537 |
JavaScript | 11 | 284 | 318 | 1,204 |
CSS | 2 | 52 | 22 | 211 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 8.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 73.00 |
Average method complexity | 2.86 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 50 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 43 | 86.00% |
▷ Protected methods | 1 | 2.00% |
▷ Private methods | 6 | 12.00% |
Functions | 38 | |
▷ Named functions | 38 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 58 | |
▷ Global constants | 26 | 44.83% |
▷ Class constants | 32 | 55.17% |
▷ Public constants | 32 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
tinymce/qiniu.png | 2.01KB | 1.37KB | ▼ 31.66% |
assets/images/XPButtonUploadText_61x22.png | 1.81KB | 1.64KB | ▼ 9.43% |