Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.31MB] [CPU: ▼5.47ms] Passed 4 tests
An overview of server-side resources used by USS Upyun
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.81 ▲0.35 | 36.70 ▲0.20 |
Dashboard /wp-admin | 3.64 ▲0.34 | 47.35 ▲2.02 |
Posts /wp-admin/edit.php | 3.69 ▲0.34 | 48.17 ▲0.07 |
Add New Post /wp-admin/post-new.php | 6.16 ▲0.28 | 82.83 ▼23.06 |
Media Library /wp-admin/upload.php | 3.50 ▲0.28 | 35.48 ▲0.91 |
又拍云USS设置 /wp-admin/options-general.php?page=uss-upyun/upyun-uss-wordpress.php | 3.47 | 31.28 |
Server storage [IO: ▲1.71MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 205 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
uss_options |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by USS Upyun
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲94 | 13.18 ▼1.21 | 4.75 ▲3.05 | 40.85 ▼5.49 |
Dashboard /wp-admin | 2,204 ▲12 | 5.80 ▲0.83 | 96.59 ▼11.59 | 42.12 ▲0.60 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.03 ▲0.00 | 40.84 ▲0.58 | 40.59 ▲5.39 |
Add New Post /wp-admin/post-new.php | 1,540 ▼2 | 23.13 ▲4.91 | 663.79 ▲54.51 | 68.22 ▲0.34 |
Media Library /wp-admin/upload.php | 1,386 ▼5 | 4.22 ▲0.04 | 98.32 ▲2.51 | 43.48 ▲3.24 |
又拍云USS设置 /wp-admin/options-general.php?page=uss-upyun/upyun-uss-wordpress.php | 1,225 | 2.03 | 24.72 | 98.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- can_compress_scripts
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
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 57× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/uss-upyun/upyun-uss-wordpress.php:15
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/promises/src/FulfilledPromise.php:11
- > PHP Fatal error
Cannot declare class Error, because the name is already in use in wp-content/plugins/uss-upyun/sdk/vendor/symfony/polyfill-php70/Resources/stubs/Error.php on line 3
- > PHP Warning
require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/uss-upyun/sdk/vendor/paragonie/random_compat/psalm-autoload.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/uss-upyun/sdk/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png)
uss-upyun/upyun-uss-wordpress.php 92% from 13 tests
Analyzing the main PHP file in "USS Upyun" version 1.3.0
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("uss-upyun.php" instead of "upyun-uss-wordpress.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin33,930 lines of code in 186 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 153 | 2,511 | 6,815 | 28,898 |
Markdown | 17 | 1,226 | 0 | 3,617 |
JSON | 13 | 0 | 0 | 1,383 |
XML | 1 | 0 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 15.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 3.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 16 | |
Interfaces | 16 | |
Traits | 2 | |
Classes | 100 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 100 | 100.00% |
▷ Final classes | 25 | 25.00% |
Methods | 805 | |
▷ Static methods | 176 | 21.86% |
▷ Public methods | 660 | 81.99% |
▷ Protected methods | 4 | 0.50% |
▷ Private methods | 141 | 17.52% |
Functions | 185 | |
▷ Named functions | 92 | 49.73% |
▷ Anonymous functions | 93 | 50.27% |
Constants | 172 | |
▷ Global constants | 44 | 25.58% |
▷ Class constants | 128 | 74.42% |
▷ Public constants | 128 | 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.41MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 61.75KB | 19.51KB | ▼ 68.41% |
screenshot-1.png | 353.28KB | 110.10KB | ▼ 68.84% |