Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▲0.35ms] Passed 4 tests
This is a short check of server-side resources used by WPCOS腾讯云对象存储COS
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.03 | 38.53 ▼1.76 |
Dashboard /wp-admin | 3.32 ▲0.02 | 44.58 ▼1.19 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 47.07 ▲2.30 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 93.39 ▲4.32 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 32.74 ▲2.05 |
WPCOS设置 /wp-admin/options-general.php?page=wpcos/wpcos_actions.php | 3.21 | 28.73 |
Server storage [IO: ▲3.04MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 249 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
wpcos_options |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WPCOS腾讯云对象存储COS
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲47 | 13.24 ▼1.07 | 1.65 ▼0.03 | 38.16 ▼9.81 |
Dashboard /wp-admin | 2,210 ▲22 | 4.88 ▲0.00 | 107.87 ▼2.60 | 47.64 ▲2.88 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 1.97 ▼0.03 | 39.53 ▲4.58 | 40.23 ▲5.52 |
Add New Post /wp-admin/post-new.php | 1,545 ▲11 | 18.31 ▼4.77 | 617.24 ▼35.32 | 54.26 ▼1.74 |
Media Library /wp-admin/upload.php | 1,389 ▲1 | 4.17 ▼0.09 | 95.81 ▲2.48 | 43.82 ▲3.86 |
WPCOS设置 /wp-admin/options-general.php?page=wpcos/wpcos_actions.php | 1,307 | 1.90 | 33.39 | 156.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- theysaidso_admin_options
- 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 smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 103× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/tests/RequestLocation/HeaderLocationTest.php:14
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/psr7/src/Response.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/tests/RequestLocation/JsonLocationTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\ResponseLocation\\AbstractLocation' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/HeaderLocation.php:11
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/tests/SerializerTest.php:12
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/tests/GuzzleClientTest.php:19
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\RequestLocation\\AbstractLocation' not found in wp-content/plugins/wpcos/sdk/cos-php-sdk-v5/vendor/guzzlehttp/guzzle-services/src/RequestLocation/BodyLocation.php:13
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: cos, wordpress
wpcos/wpcos.php 92% from 13 tests
"WPCOS腾讯云对象存储COS" version 4.7.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Description: Please don't use more than 140 characters for the plugin description (currently 156 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
No dangerous file extensions were detected27,785 lines of code in 222 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 181 | 2,894 | 7,711 | 23,200 |
Markdown | 13 | 1,263 | 0 | 3,602 |
JSON | 8 | 0 | 0 | 687 |
SVG | 1 | 356 | 3 | 195 |
XML | 2 | 0 | 0 | 29 |
YAML | 1 | 4 | 0 | 19 |
make | 2 | 9 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
HTML | 1 | 1 | 0 | 9 |
JavaScript | 6 | 0 | 5 | 9 |
CSS | 6 | 0 | 4 | 6 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 11.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 92.00 |
Average method complexity | 2.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 26 | |
Interfaces | 23 | |
Traits | 3 | |
Classes | 137 | |
▷ Abstract classes | 2 | 1.46% |
▷ Concrete classes | 135 | 98.54% |
▷ Final classes | 9 | 6.67% |
Methods | 1,198 | |
▷ Static methods | 75 | 6.26% |
▷ Public methods | 1,013 | 84.56% |
▷ Protected methods | 32 | 2.67% |
▷ Private methods | 153 | 12.77% |
Functions | 194 | |
▷ Named functions | 85 | 43.81% |
▷ Anonymous functions | 109 | 56.19% |
Constants | 69 | |
▷ Global constants | 4 | 5.80% |
▷ Class constants | 65 | 94.20% |
▷ Public constants | 65 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.14MB with 0.10MB 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% |
layui/images/footer_logo.png | 24.87KB | 0.95KB | ▼ 96.18% |
layui/css/modules/layer/default/icon-ext.png | 5.77KB | 2.91KB | ▼ 49.62% |
layui/images/qrcode.png | 72.54KB | 12.37KB | ▼ 82.94% |