Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.32MB] [CPU: ▼5.24ms] Passed 4 tests
A check of server-side resources used by OBS HuaWeiCloud
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.83 ▲0.37 | 45.80 ▲7.55 |
Dashboard /wp-admin | 3.67 ▲0.32 | 46.71 ▼15.27 |
Posts /wp-admin/edit.php | 3.72 ▲0.36 | 47.15 ▲0.33 |
Add New Post /wp-admin/post-new.php | 6.19 ▲0.30 | 84.36 ▼11.27 |
Media Library /wp-admin/upload.php | 3.53 ▲0.30 | 39.74 ▲5.27 |
华为云OBS设置 /wp-admin/options-general.php?page=obs-huaweicloud/huaweicloud-obs-wordpress.php | 3.49 | 30.81 |
Server storage [IO: ▲2.70MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 336 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
obs_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for OBS HuaWeiCloud
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.53 ▲0.16 | 1.92 ▲0.12 | 44.06 ▼2.09 |
Dashboard /wp-admin | 2,199 ▲19 | 5.63 ▼0.02 | 82.86 ▼14.74 | 43.60 ▼1.74 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.03 ▲0.02 | 36.94 ▼2.76 | 39.25 ▲4.79 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.11 ▲0.17 | 686.38 ▼7.45 | 58.99 ▼2.44 |
Media Library /wp-admin/upload.php | 1,401 ▲1 | 4.19 ▲0.01 | 101.73 ▲1.24 | 49.01 ▲3.29 |
华为云OBS设置 /wp-admin/options-general.php?page=obs-huaweicloud/huaweicloud-obs-wordpress.php | 1,181 | 2.16 | 23.02 | 86.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
- 151× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php:23
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:4
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
- > PHP Fatal error
Uncaught Error: Class 'Obs\\Internal\\Signature\\AbstractSignature' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/obs/esdk-obs-php/Obs/Internal/Signature/V4Signature.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/obs-huaweicloud/huaweicloud-obs-wordpress.php:18
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Logger' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/obs/esdk-obs-php/Obs/ObsClient.php:34
- > PHP Fatal error
Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php:19
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/obs-huaweicloud/sdk/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php:22
- > PHP Fatal error
Cannot declare class TypeError, because the name is already in use in wp-content/plugins/obs-huaweicloud/sdk/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php on line 3
- > PHP Fatal error
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 90% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
obs-huaweicloud/huaweicloud-obs-wordpress.php 85% from 13 tests
The primary PHP file in "OBS HuaWeiCloud" version 1.3.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("obs-huaweicloud.php" instead of "huaweicloud-obs-wordpress.php")
- Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected52,054 lines of code in 313 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 276 | 4,844 | 11,474 | 46,484 |
Markdown | 19 | 1,338 | 0 | 3,973 |
JSON | 15 | 1 | 0 | 1,565 |
XML | 1 | 0 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
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.47 |
Average class complexity | 14.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 3.18 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 30 | |
Interfaces | 28 | |
Traits | 8 | |
Classes | 204 | |
▷ Abstract classes | 8 | 3.92% |
▷ Concrete classes | 196 | 96.08% |
▷ Final classes | 25 | 12.76% |
Methods | 1,517 | |
▷ Static methods | 218 | 14.37% |
▷ Public methods | 1,106 | 72.91% |
▷ Protected methods | 166 | 10.94% |
▷ Private methods | 245 | 16.15% |
Functions | 215 | |
▷ Named functions | 91 | 42.33% |
▷ Anonymous functions | 124 | 57.67% |
Constants | 292 | |
▷ Global constants | 53 | 18.15% |
▷ Class constants | 239 | 81.85% |
▷ Public constants | 239 | 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.37MB with 0.26MB 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 | 317.00KB | 94.95KB | ▼ 70.05% |