Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.93ms] Passed 4 tests
Server-side resources used by WooCommerce Braintree Payment Gateway
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 36.22 ▼3.22 |
Dashboard /wp-admin | 3.31 ▲0.01 | 47.40 ▼0.00 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 49.58 ▲0.59 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 90.48 ▼7.18 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.61 ▼1.33 |
Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 192 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
WooCommerce Braintree Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲68 | 13.29 ▼1.40 | 4.79 ▲2.52 | 40.57 ▼0.24 |
Dashboard /wp-admin | 2,209 ▲21 | 5.86 ▲0.97 | 108.72 ▼5.58 | 42.61 ▲3.06 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.98 ▼0.02 | 39.70 ▼0.92 | 36.39 ▼2.18 |
Add New Post /wp-admin/post-new.php | 1,546 ▲27 | 23.44 ▲0.57 | 605.46 ▼5.12 | 48.82 ▼6.25 |
Media Library /wp-admin/upload.php | 1,385 ▼3 | 4.26 ▲0.05 | 100.98 ▲5.54 | 42.59 ▼1.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
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
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 107× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Exception/ForgedQueryString.php:16
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/ThreeDSecureInfo.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\PartialMatchNode' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/TextNode.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Exception/Timeout.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Instance' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Transaction/StatusDetails.php:18
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Transaction.php:214
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Collection' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Error/ValidationErrorCollection.php:19
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Merchant.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Result/Error.php:36
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/woocommerce-braintree-payment-gateway/includes/lib/Braintree/Exception/TooManyRequests.php:12
- > 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 on the user side
Optimizations
Plugin configuration 96% 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: payments, payment gateway, woocommerce, credit card, braintreepayments...
woocommerce-braintree-payment-gateway/woocommerce-braintree-payment-gateway.php 92% from 13 tests
"WooCommerce Braintree Payment Gateway" version 1.9.5'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:
- Description: Keep the plugin description shorter than 140 characters (currently 173 characters long)
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are 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/woocommerce-braintree-payment-gateway/includes/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 | 184 | 1,777 | 5,173 | 10,679 |
CSS | 1 | 45 | 10 | 247 |
JavaScript | 1 | 11 | 3 | 139 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 4.78 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 1.66 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 182 | |
▷ Abstract classes | 2 | 1.10% |
▷ Concrete classes | 180 | 98.90% |
▷ Final classes | 0 | 0.00% |
Methods | 1,031 | |
▷ Static methods | 443 | 42.97% |
▷ Public methods | 859 | 83.32% |
▷ Protected methods | 55 | 5.33% |
▷ Private methods | 117 | 11.35% |
Functions | 8 | |
▷ Named functions | 3 | 37.50% |
▷ Anonymous functions | 5 | 62.50% |
Constants | 808 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 808 | 100.00% |
▷ Public constants | 808 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/cards.png | 5.35KB | 1.83KB | ▼ 65.70% |