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
Install script ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼0.08ms] Passed 4 tests
This is a short check of server-side resources used by Payment Plugins Braintree For WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.04 | 43.28 ▲4.97 |
Dashboard /wp-admin | 3.34 ▲0.04 | 50.06 ▲2.17 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 46.54 ▼5.12 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 85.71 ▲1.92 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 34.37 ▲0.71 |
Server storage [IO: ▲3.24MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 650 new files
Database: no new tables, 8 new options
New WordPress options |
---|
woocommerce_queue_flush_rewrite_rules |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
braintree_wc_version |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Payment Plugins Braintree For WooCommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,812 ▲66 | 13.57 ▼0.98 | 4.75 ▲3.10 | 43.26 ▲2.90 |
Dashboard /wp-admin | 2,218 ▲33 | 4.88 ▼0.97 | 112.54 ▲8.63 | 44.05 ▲0.44 |
Posts /wp-admin/edit.php | 2,100 ▲11 | 2.06 ▲0.04 | 37.67 ▲0.92 | 32.04 ▼2.15 |
Add New Post /wp-admin/post-new.php | 1,540 ▲26 | 23.30 ▲5.42 | 661.19 ▲9.32 | 55.72 ▲10.10 |
Media Library /wp-admin/upload.php | 1,400 ▲21 | 4.19 ▼0.01 | 94.50 ▼10.34 | 45.44 ▲0.37 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall successfully, leaving 8 options in the database
- braintree_wc_version
- widget_recent-comments
- woocommerce_queue_flush_rewrite_rules
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
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)
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/woo-payment-gateway/templates/cart/paypal.php
- > /wp-content/plugins/woo-payment-gateway/templates/mini-cart/googlepay.php
- > /wp-content/plugins/woo-payment-gateway/templates/loaders/simple-dots.php
- > /wp-content/plugins/woo-payment-gateway/templates/loaders/stairs-loader.php
- > /wp-content/plugins/woo-payment-gateway/templates/checkout/applepay.php
- > /wp-content/plugins/woo-payment-gateway/templates/checkout/checkout-banner.php
- > /wp-content/plugins/woo-payment-gateway/templates/product/paypal.php
- > /wp-content/plugins/woo-payment-gateway/templates/mini-cart/paypal.php
- > /wp-content/plugins/woo-payment-gateway/templates/loaders/ping-pong.php
- > /wp-content/plugins/woo-payment-gateway/templates/card-icons.php
- 197× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-payment-gateway/templates/custom-forms/simple-form.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/Braintree/MerchantAccount.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function wc_braintree_get_template() in wp-content/plugins/woo-payment-gateway/templates/product/applepay.php:11
- > PHP Fatal error
Uncaught Error: Class 'PaymentPlugins\\WooCommerce\\Blocks\\Braintree\\Payments\\Gateways\\AbstractGateway' not found in wp-content/plugins/woo-payment-gateway/packages/blocks/src/Payments/Gateways/ApplePayGateway.php:7
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/Braintree/MerchantAccount/IndividualDetails.php:12
- > PHP Fatal error
Uncaught Error: Class 'WC_Braintree_Rest_Controller' not found in wp-content/plugins/woo-payment-gateway/includes/deprecated/api/class-wcs-braintree-controller.php:10
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/Braintree/GooglePayCard.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-payment-gateway/templates/custom-forms/bootstrap-form.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/Braintree/Exception/InvalidChallenge.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/Braintree/OAuthResult.php:8
- > 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 errors were detected
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
- Donate link: Please fix this invalid URI: ""
woo-payment-gateway/braintree-payments.php 85% from 13 tests
Analyzing the main PHP file in "Payment Plugins Braintree For WooCommerce" version 3.2.48
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-payment-gateway.php" instead of "braintree-payments.php")
- Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/woo-payment-gateway/vendor/braintree/braintree_php/lib/ssl/api_braintreegateway_com.ca.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 434 | 4,949 | 13,725 | 33,532 |
JavaScript | 108 | 828 | 766 | 8,709 |
CSS | 19 | 785 | 70 | 5,254 |
SVG | 47 | 12 | 13 | 801 |
Markdown | 2 | 234 | 0 | 759 |
Sass | 10 | 49 | 0 | 298 |
XML | 2 | 9 | 14 | 116 |
JSON | 1 | 0 | 0 | 58 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 7.83 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 313.00 |
Average method complexity | 1.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 39.00 |
Code structure | ||
---|---|---|
Namespaces | 25 | |
Interfaces | 1 | |
Traits | 2 | |
Classes | 317 | |
▷ Abstract classes | 9 | 2.84% |
▷ Concrete classes | 308 | 97.16% |
▷ Final classes | 0 | 0.00% |
Methods | 2,214 | |
▷ Static methods | 632 | 28.55% |
▷ Public methods | 1,886 | 85.19% |
▷ Protected methods | 100 | 4.52% |
▷ Private methods | 228 | 10.30% |
Functions | 380 | |
▷ Named functions | 335 | 88.16% |
▷ Anonymous functions | 45 | 11.84% |
Constants | 905 | |
▷ Global constants | 3 | 0.33% |
▷ Class constants | 902 | 99.67% |
▷ Public constants | 902 | 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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/applepay/applepay_button_plain.png | 3.81KB | 1.98KB | ▼ 48.04% |
assets/img/applepay/applepay_button_buy.png | 5.67KB | 2.67KB | ▼ 52.83% |