Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼9.81ms] Passed 4 tests
Server-side resources used by Midtrans-WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 43.68 ▼2.21 |
Dashboard /wp-admin | 3.33 ▼0.01 | 51.38 ▼11.61 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 49.19 ▼1.97 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 84.86 ▼23.45 |
Media Library /wp-admin/upload.php | 3.26 ▲0.02 | 37.00 ▲0.05 |
Server storage [IO: ▲0.45MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 103 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by Midtrans-WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.45 ▲0.10 | 1.66 ▼0.14 | 46.14 ▲2.85 |
Dashboard /wp-admin | 2,198 ▲18 | 5.63 ▲0.01 | 82.30 ▼8.00 | 40.52 ▼2.57 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 1.95 ▼0.09 | 35.93 ▼2.99 | 31.13 ▼1.34 |
Add New Post /wp-admin/post-new.php | 1,526 ▼11 | 23.18 ▼0.29 | 702.35 ▲41.08 | 65.38 ▲12.70 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.20 ▲0.03 | 97.00 ▼12.95 | 44.14 ▼3.91 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
Smoke tests 75% 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)
Everything seems fine, however this is by no means 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
- 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/midtrans-woocommerce/class/order-view-and-thankyou-page.php:9
- > PHP Fatal error
Uncaught Error: Class 'WC_Gateway_Midtrans_Abstract' not found in wp-content/plugins/midtrans-woocommerce/class/class.midtrans-gateway-installmentoff.php:7
- > PHP Fatal error
Uncaught Error: Class 'WC_Gateway_Midtrans_Abstract' not found in wp-content/plugins/midtrans-woocommerce/class/class.midtrans-gateway.php:31
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/midtrans-woocommerce/lib/midtrans/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/midtrans-woocommerce/lib/midtrans/test_bootstrap.php on line 6
- > PHP Warning
require_once(wp-content/plugins/midtrans-woocommerce/lib/midtrans/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/midtrans-woocommerce/lib/midtrans/test_bootstrap.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WC_Gateway_Midtrans_Abstract' not found in wp-content/plugins/midtrans-woocommerce/class/class.midtrans-gateway-installment.php:8
- > PHP Fatal error
Uncaught Error: Class 'WC_Midtrans_Utils' not found in wp-content/plugins/midtrans-woocommerce/class/payment-page.php:28
- > PHP Fatal error
Uncaught Error: Class 'WC_Gateway_Midtrans_Abstract' not found in wp-content/plugins/midtrans-woocommerce/class/class.midtrans-gateway-promo.php:11
- > PHP Fatal error
Uncaught Error: Class 'WC_Gateway_Midtrans_Abstract' not found in wp-content/plugins/midtrans-woocommerce/class/class.midtrans-gateway-paymentrequest.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/midtrans-woocommerce/class/finish-url-page.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: veritrans, payment, e-commerce, woocommerce, commerce...
midtrans-woocommerce/midtrans-gateway.php 77% from 13 tests
The main PHP script in "Midtrans-WooCommerce" version 2.32.2 is automatically included on every request by WordPress
The following require your attention:
- Requires at least: The required version number did not match the one declared in readme.txt ("3.9.1" instead of "2.0.0")
- Main file name: Name the main plugin file the same as the plugin slug ("midtrans-woocommerce.php" instead of "midtrans-gateway.php")
- Description: The description should be shorter than 140 characters (currently 165 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
Everything looks great! No dangerous files found in this plugin3,859 lines of code in 56 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 46 | 421 | 1,297 | 2,900 |
Markdown | 4 | 175 | 0 | 634 |
JavaScript | 4 | 22 | 41 | 262 |
JSON | 1 | 0 | 0 | 34 |
XML | 1 | 0 | 0 | 29 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 7.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 72.00 |
Average method complexity | 2.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 37 | |
▷ Abstract classes | 2 | 5.41% |
▷ Concrete classes | 35 | 94.59% |
▷ Final classes | 0 | 0.00% |
Methods | 233 | |
▷ Static methods | 51 | 21.89% |
▷ Public methods | 167 | 71.67% |
▷ Protected methods | 55 | 23.61% |
▷ Private methods | 11 | 4.72% |
Functions | 8 | |
▷ Named functions | 5 | 62.50% |
▷ Anonymous functions | 3 | 37.50% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ Public constants | 4 | 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
40 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/payment-methods/alt_alfamart_2.png | 4.60KB | 2.62KB | ▼ 43.08% |
public/images/payment-methods/alt_mandiri_clickpay.png | 10.53KB | 4.15KB | ▼ 60.58% |
public/images/payment-methods/bca_klikpay.png | 2.59KB | 2.30KB | ▼ 11.24% |
public/images/payment-methods/credit_card.png | 0.73KB | 0.53KB | ▼ 27.31% |
public/images/payment-methods/qris.png | 3.23KB | 2.85KB | ▼ 11.77% |