Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼5.74ms] Passed 4 tests
An overview of server-side resources used by WP Braintree
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 40.91 ▼0.59 |
Dashboard /wp-admin | 3.35 ▲0.04 | 47.02 ▲3.04 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 42.36 ▼4.08 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 79.85 ▼17.95 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 33.22 ▼0.32 |
Settings /wp-admin/edit.php?post_type=braintree_payment&page=wp_braintree_settings | 3.24 | 29.69 |
Payments /wp-admin/edit.php?post_type=braintree_payment | 3.31 | 36.15 |
Server storage [IO: ▲3.43MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 616 new files
Database: no new tables, 8 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
wp_braintree_api_keys |
widget_theysaidso_widget |
wp_braintree_opts |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for WP Braintree
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲77 | 13.20 ▼1.18 | 1.81 ▲0.11 | 43.96 ▼3.91 |
Dashboard /wp-admin | 2,232 ▲47 | 4.85 ▼1.01 | 95.28 ▼4.95 | 93.81 ▲49.69 |
Posts /wp-admin/edit.php | 2,112 ▲23 | 2.02 ▼0.00 | 34.62 ▼5.60 | 31.44 ▼1.69 |
Add New Post /wp-admin/post-new.php | 1,534 ▲20 | 23.18 ▲5.66 | 750.94 ▲83.62 | 71.76 ▲18.02 |
Media Library /wp-admin/upload.php | 1,411 ▲29 | 4.23 ▲0.03 | 96.28 ▼0.19 | 79.87 ▲36.00 |
Settings /wp-admin/edit.php?post_type=braintree_payment&page=wp_braintree_settings | 917 | 2.11 | 29.72 | 25.57 |
Payments /wp-admin/edit.php?post_type=braintree_payment | 1,070 | 2.00 | 31.54 | 29.13 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 8 options
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- wp_braintree_api_keys
- widget_recent-comments
- widget_recent-posts
- wp_braintree_opts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following items
- 109× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/Address.php:29
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Result\\CreditCardVerification' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/CreditCardVerification.php:28
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/AndroidPayCard.php:34
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/Exception/DownForMaintenance.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/Exception/ValidationsFailed.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/SamsungPayCard.php:41
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/Exception/UpgradeRequired.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\EqualityNode' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/PartialMatchNode.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Modification' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/AddOn.php:18
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\PartialMatchNode' not found in wp-content/plugins/wp-braintree/braintree/lib/Braintree/TextNode.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
- Tags: There are too many tags (12 tag instead of maximum 10)
wp-braintree/main.php 92% from 13 tests
The main file in "WP Braintree" v. 2.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-braintree.php" instead of "main.php")
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please fix the following items
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/wp-braintree/braintree/lib/ssl/api_braintreegateway_com.ca.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 77 | 1,117 | 1,999 | 36,591 |
PHP | 187 | 1,848 | 5,182 | 11,246 |
JavaScript | 3 | 37 | 21 | 339 |
PO File | 1 | 59 | 59 | 145 |
XML | 2 | 0 | 0 | 8 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 5.09 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 88.00 |
Average method complexity | 1.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 42.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 183 | |
▷ Abstract classes | 2 | 1.09% |
▷ Concrete classes | 181 | 98.91% |
▷ Final classes | 0 | 0.00% |
Methods | 1,044 | |
▷ Static methods | 445 | 42.62% |
▷ Public methods | 872 | 83.52% |
▷ Protected methods | 55 | 5.27% |
▷ Private methods | 117 | 11.21% |
Functions | 5 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 5 | 100.00% |
Constants | 810 | |
▷ Global constants | 2 | 0.25% |
▷ Class constants | 808 | 99.75% |
▷ Public constants | 808 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
342 PNG files occupy 0.90MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/themes/humanity/images/ui-icons_f08000_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
css/themes/swanky-purse/images/ui-bg_flat_75_ddd4b0_40x100.png | 0.20KB | 0.08KB | ▼ 57.77% |
css/themes/dot-luv/images/ui-icons_98d2fb_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
css/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png | 0.20KB | 0.09KB | ▼ 57.49% |
css/themes/hot-sneaks/images/ui-icons_88a206_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |