Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼5.90ms] Passed 4 tests
An overview of server-side resources used by Pomelo Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 38.73 ▼0.87 |
Dashboard /wp-admin | 3.31 ▼0.03 | 56.30 ▼6.47 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 46.91 ▼1.49 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 84.42 ▼14.77 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 36.96 ▲3.86 |
Server storage [IO: ▲1.32MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 189 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Pomelo Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.86 ▲0.49 | 1.61 ▼0.69 | 40.85 ▼3.42 |
Dashboard /wp-admin | 2,206 ▲18 | 4.85 ▼1.05 | 113.76 ▲7.72 | 37.12 ▼8.82 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.04 ▼0.00 | 35.45 ▼0.50 | 34.56 ▲1.45 |
Add New Post /wp-admin/post-new.php | 1,530 ▲16 | 23.16 ▲5.47 | 697.42 ▲4.22 | 62.43 ▲10.62 |
Media Library /wp-admin/upload.php | 1,385 ▼3 | 4.22 ▼0.08 | 96.02 ▼6.38 | 44.74 ▼0.84 |
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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
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
The smoke test was a success, however most plugin functionality was not tested
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 take a closer look at the following
- 50× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/promises/src/AggregateException.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/pomelo-payment-gateway/vendor/pomelopay/pomelopay-connect-php/test/ExpiresTest.php:9
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/promises/src/EachPromise.php:9
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/promises/src/Promise.php:10
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/psr7/src/FnStream.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/psr7/src/Stream.php:12
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Polyfill\\Intl\ormalizer\ormalizer' not found in wp-content/plugins/pomelo-payment-gateway/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php:3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/pomelo-payment-gateway/vendor/guzzlehttp/promises/src/CancellationException.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Tags: There are too many tags (14 tag instead of maximum 10)
pomelo-payment-gateway/pomelo-woocommerce.php 85% from 13 tests
"Pomelo Payment Gateway for WooCommerce" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("pomelo-payment-gateway.php" instead of "pomelo-woocommerce.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin32,359 lines of code in 174 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 139 | 2,376 | 6,187 | 27,512 |
Markdown | 15 | 1,165 | 0 | 3,528 |
JSON | 11 | 1 | 0 | 957 |
XML | 2 | 0 | 0 | 173 |
YAML | 4 | 27 | 0 | 88 |
PO File | 1 | 27 | 27 | 82 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 15.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 3.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 16 | |
Interfaces | 15 | |
Traits | 2 | |
Classes | 95 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 95 | 100.00% |
▷ Final classes | 23 | 24.21% |
Methods | 792 | |
▷ Static methods | 149 | 18.81% |
▷ Public methods | 640 | 80.81% |
▷ Protected methods | 4 | 0.51% |
▷ Private methods | 148 | 18.69% |
Functions | 160 | |
▷ Named functions | 70 | 43.75% |
▷ Anonymous functions | 90 | 56.25% |
Constants | 165 | |
▷ Global constants | 41 | 24.85% |
▷ Class constants | 124 | 75.15% |
▷ Public constants | 124 | 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
No PNG images were found in this plugin