Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼6.52ms] Passed 4 tests
An overview of server-side resources used by ImageX
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 35.26 ▼3.80 |
Dashboard /wp-admin | 3.32 ▼0.03 | 42.39 ▼16.38 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.43 ▲0.80 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 78.90 ▼6.71 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.78 ▲0.83 |
火山引擎ImageX设置 /wp-admin/options-general.php?page=imagex/imagex.php | 3.21 | 30.24 |
Server storage [IO: ▲1.72MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 208 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
imagex_options |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for ImageX
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲47 | 14.17 ▼0.42 | 1.53 ▲0.04 | 40.52 ▲1.12 |
Dashboard /wp-admin | 2,193 ▲16 | 5.48 ▼0.19 | 89.92 ▲0.50 | 46.74 ▲4.15 |
Posts /wp-admin/edit.php | 2,104 ▲7 | 1.97 ▲0.02 | 41.13 ▲6.84 | 42.13 ▲6.73 |
Add New Post /wp-admin/post-new.php | 1,544 ▲9 | 23.26 ▲5.31 | 665.18 ▲26.91 | 52.36 ▼18.50 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.20 ▼0.07 | 106.16 ▲10.02 | 49.12 ▲3.50 |
火山引擎ImageX设置 /wp-admin/options-general.php?page=imagex/imagex.php | 1,201 | 2.16 | 21.93 | 117.32 |
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
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
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
Please fix the following
- 60× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/imagex/sdk/vendor/guzzlehttp/guzzle/src/Pool.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/imagex/sdk/vendor/psr/http-message/src/ServerRequestInterface.php:43
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/imagex/imagex.php:17
- > PHP Fatal error
Trait 'Volc\\Base\\SignatureTrait' not found in wp-content/plugins/imagex/sdk/vendor/volcengine/volc-sdk-php/src/Base/SignatureV4.php on line 12
- > PHP Fatal error
Uncaught Error: Class 'Volc\\Base\\V4Curl' not found in wp-content/plugins/imagex/sdk/vendor/volcengine/volc-sdk-php/src/Service/ImageX/ImageX.php:15
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/imagex/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/imagex/sdk/vendor/guzzlehttp/psr7/src/InflateStream.php:20
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/imagex/sdk/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
- > PHP Fatal error
Cannot declare class DivisionByZeroError, because the name is already in use in wp-content/plugins/imagex/sdk/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php on line 0
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/imagex/sdk/vendor/guzzlehttp/psr7/src/Stream.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: byteoc, imagex, volcengine
imagex/imagex.php 92% from 13 tests
The primary PHP file in "ImageX" version 1.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected35,773 lines of code in 187 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 155 | 2,642 | 6,827 | 30,842 |
Markdown | 16 | 1,193 | 0 | 3,545 |
JSON | 13 | 0 | 0 | 1,354 |
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
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.44 |
Average class complexity | 16.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 3.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 18 | |
Interfaces | 16 | |
Traits | 3 | |
Classes | 99 | |
▷ Abstract classes | 1 | 1.01% |
▷ Concrete classes | 98 | 98.99% |
▷ Final classes | 25 | 25.51% |
Methods | 907 | |
▷ Static methods | 168 | 18.52% |
▷ Public methods | 738 | 81.37% |
▷ Protected methods | 15 | 1.65% |
▷ Private methods | 154 | 16.98% |
Functions | 190 | |
▷ Named functions | 92 | 48.42% |
▷ Anonymous functions | 98 | 51.58% |
Constants | 167 | |
▷ Global constants | 44 | 26.35% |
▷ Class constants | 123 | 73.65% |
▷ Public constants | 123 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.33MB with 0.23MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 339.01KB | 100.27KB | ▼ 70.42% |