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.25MB] [CPU: ▼5.51ms] Passed 4 tests
A check of server-side resources used by Finance Gateway for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 39.70 ▲3.17 |
Dashboard /wp-admin | 3.57 ▲0.22 | 47.25 ▼12.40 |
Posts /wp-admin/edit.php | 3.68 ▲0.32 | 45.95 ▼0.62 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 81.07 ▼12.18 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 37.10 ▲7.30 |
Server storage [IO: ▲1.40MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 264 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Finance Gateway for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.17 ▼0.20 | 1.63 ▲0.16 | 37.25 ▼7.80 |
Dashboard /wp-admin | 2,195 ▲17 | 5.61 ▲0.02 | 82.79 ▼20.14 | 39.95 ▼0.17 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.04 | 34.17 ▼2.73 | 36.07 ▼1.86 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.77 ▲0.63 | 660.68 ▲14.71 | 63.67 ▲6.39 |
Media Library /wp-admin/upload.php | 1,397 ▼6 | 4.27 ▲0.08 | 94.28 ▼4.28 | 41.47 ▼5.30 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/finance-gateway-for-woocommerce/includes/calculator.php
- > /wp-content/plugins/finance-gateway-for-woocommerce/includes/checkout.php
- > /wp-content/plugins/finance-gateway-for-woocommerce/includes/widget.php
- > /wp-content/plugins/finance-gateway-for-woocommerce/class-wc-gateway-finance.php
- 108× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Divido\\MerchantSDK\\Test\\Unit\\MerchantSDKTestCase' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/divido/merchant-sdk/tests/unit/Handlers/PlatformEnvironmentsHandlerTest.php:11
- > PHP Fatal error
Uncaught Error: Interface 'Http\\Message\\Exception' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/message/src/Exception/UnexpectedValueException.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/message/src/Authentication/Bearer.php:13
- > PHP Fatal error
Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php:20
- > PHP Fatal error
Uncaught Error: Class 'Divido\\MerchantSDK\\Handlers\\AbstractHttpHandler' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/divido/merchant-sdk/lib/Handlers/PlatformEnvironments/Handler.php:17
- > PHP Fatal error
Uncaught Error: Class 'Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/discovery/src/MessageFactoryDiscovery.php:15
- > PHP Fatal error
Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/psr/log/Psr/Log/Test/TestLogger.php:57
- > PHP Fatal error
Uncaught Error: Class 'Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/discovery/src/UriFactoryDiscovery.php:15
- > PHP Fatal error
Uncaught Error: Class 'Http\\Message\\Encoding\\FilteredStream' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/php-http/message/src/Encoding/DechunkStream.php:12
- > PHP Fatal error
Uncaught Error: Class 'Divido\\MerchantSDK\\Test\\Unit\\MerchantSDKTestCase' not found in wp-content/plugins/finance-gateway-for-woocommerce/vendor/divido/merchant-sdk/tests/unit/Helpers/StrTest.php:10
- > 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 issues were found
Optimizations
Plugin configuration 93% 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
7 plugin tags: payment gateway, ecommerce, woocommerce, woothemes, module...
finance-gateway-for-woocommerce/class-wc-gateway-finance.php 85% from 13 tests
"Finance Gateway for WooCommerce" version 2.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("finance-gateway-for-woocommerce.php" instead of "class-wc-gateway-finance.php")
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
There were no executable files found in this plugin29,180 lines of code in 238 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 29 | 0 | 0 | 16,957 |
PHP | 183 | 2,939 | 5,830 | 10,592 |
Markdown | 14 | 664 | 0 | 1,327 |
JavaScript | 2 | 20 | 5 | 122 |
YAML | 5 | 6 | 1 | 88 |
make | 1 | 13 | 2 | 35 |
XML | 1 | 1 | 0 | 18 |
Bourne Shell | 1 | 6 | 15 | 17 |
CSS | 1 | 7 | 1 | 16 |
Dockerfile | 1 | 3 | 0 | 8 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 5.63 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 211.00 |
Average method complexity | 2.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 47 | |
Interfaces | 22 | |
Traits | 15 | |
Classes | 129 | |
▷ Abstract classes | 6 | 4.65% |
▷ Concrete classes | 123 | 95.35% |
▷ Final classes | 39 | 31.71% |
Methods | 826 | |
▷ Static methods | 65 | 7.87% |
▷ Public methods | 740 | 89.59% |
▷ Protected methods | 45 | 5.45% |
▷ Private methods | 41 | 4.96% |
Functions | 23 | |
▷ Named functions | 8 | 34.78% |
▷ Anonymous functions | 15 | 65.22% |
Constants | 42 | |
▷ Global constants | 4 | 9.52% |
▷ Class constants | 38 | 90.48% |
▷ Public constants | 35 | 92.11% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 4.20KB | 2.18KB | ▼ 48.12% |
images/finance.png | 5.53KB | 0.10KB | ▼ 98.11% |
assets/banner-772x250.png | 59.72KB | 24.19KB | ▼ 59.50% |
images/finance-icon.png | 3.43KB | 0.08KB | ▼ 97.52% |
images/finance-small.png | 3.43KB | 0.08KB | ▼ 97.52% |