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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼2.46ms] Passed 4 tests
An overview of server-side resources used by BlueSnap Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 41.82 ▲2.18 |
Dashboard /wp-admin | 3.39 ▲0.09 | 48.96 ▲1.84 |
Posts /wp-admin/edit.php | 3.50 ▲0.15 | 46.63 ▲0.87 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 82.71 ▼11.76 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 35.85 ▼0.78 |
Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for BlueSnap Payment Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲35 | 14.35 ▼0.02 | 1.77 ▲0.17 | 43.57 ▲2.68 |
Dashboard /wp-admin | 2,202 ▲25 | 5.65 ▼0.01 | 94.02 ▲2.67 | 43.19 ▲2.68 |
Posts /wp-admin/edit.php | 2,108 ▲8 | 2.02 ▲0.05 | 34.91 ▼1.33 | 33.55 ▼2.20 |
Add New Post /wp-admin/post-new.php | 1,533 ▲2 | 23.06 ▼0.28 | 662.75 ▼23.52 | 57.13 ▲5.30 |
Media Library /wp-admin/upload.php | 1,401 ▼2 | 4.18 ▼0.04 | 95.14 ▼8.28 | 42.01 ▼4.01 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
The following issues need your attention
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/includes/admin/views/admin-display.php
- > /wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/public-display.php
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Notice
Undefined variable: hide in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/multicurrency-wrapper.php on line 16
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/multicurrency-wrapper.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/payment-fields-bluesnap.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/payment-fields-bluesnap-ach.php:14
- > PHP Fatal error
Uncaught Error: Class 'WC_Bluesnap_Multicurrency' not found in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/multicurrency-selector.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bluesnap-payment-gateway-for-woocommerce/templates/fraud-kount-iframe.php:16
- > PHP Notice
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 90% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: woocommerce, apple pay, bluesnap, ach, payment...
bluesnap-payment-gateway-for-woocommerce/bluesnap-for-woocommerce.php 77% from 13 tests
The main PHP file in "BlueSnap Payment Gateway for WooCommerce" ver. 3.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bluesnap-payment-gateway-for-woocommerce.php" instead of "bluesnap-for-woocommerce.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Requires at least: Required version must match the one declared in readme.txt ("5.2.4" instead of "3.7.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin10,368 lines of code in 67 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 48 | 1,717 | 2,806 | 7,334 |
JavaScript | 12 | 408 | 214 | 2,782 |
Sass | 2 | 14 | 0 | 139 |
CSS | 4 | 8 | 13 | 110 |
JSON | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 41.42 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 236.00 |
Average method complexity | 4.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 44.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 1 | |
Classes | 30 | |
▷ Abstract classes | 3 | 10.00% |
▷ Concrete classes | 27 | 90.00% |
▷ Final classes | 1 | 3.70% |
Methods | 406 | |
▷ Static methods | 74 | 18.23% |
▷ Public methods | 287 | 70.69% |
▷ Protected methods | 79 | 19.46% |
▷ Private methods | 40 | 9.85% |
Functions | 10 | |
▷ Named functions | 8 | 80.00% |
▷ Anonymous functions | 2 | 20.00% |
Constants | 46 | |
▷ Global constants | 13 | 28.26% |
▷ Class constants | 33 | 71.74% |
▷ Public constants | 33 | 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
10 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/cb.png | 4.14KB | 1.60KB | ▼ 61.50% |
assets/images/diners.png | 0.76KB | 0.74KB | ▼ 1.80% |
assets/images/amex.png | 1.16KB | 1.16KB | 0.00% |
assets/images/generic-card.png | 0.82KB | 0.59KB | ▼ 27.62% |
assets/images/mastercard.png | 0.68KB | 0.68KB | 0.00% |