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
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼8.35ms] Passed 4 tests
An overview of server-side resources used by Woo Braintree Payment
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 33.12 ▼7.00 |
Dashboard /wp-admin | 3.31 ▼0.04 | 43.70 ▼17.12 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.31 ▼2.66 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 91.83 ▼6.61 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 30.90 ▼0.37 |
Server storage [IO: ▲1.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 306 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
Woo Braintree Payment: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.68 ▲0.36 | 1.55 ▼0.25 | 41.96 ▼3.07 |
Dashboard /wp-admin | 2,192 ▲12 | 5.48 ▼0.04 | 90.83 ▼7.25 | 40.74 ▼0.76 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.01 ▲0.01 | 39.58 ▲2.18 | 35.05 ▲2.58 |
Add New Post /wp-admin/post-new.php | 1,526 ▼3 | 23.32 ▲0.11 | 593.39 ▼118.68 | 53.69 ▼3.05 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.21 ▼0.04 | 97.99 ▼0.11 | 42.21 ▲0.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
The following issues need your attention
- 163× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Collection' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/Error/ValidationErrorCollection.php:20
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/PartnerMerchant.php:19
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/braintree/lib/Braintree/Transaction.php:174
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\EqualityNode' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/PartialMatchNode.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Instance' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/MerchantAccount/AddressDetails.php:6
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/MerchantAccount.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/CreditCard.php:32
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\MultipleValueNode' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/braintree/lib/Braintree/MultipleValueOrTextNode.php:4
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/Subscription.php:16
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Instance' not found in wp-content/plugins/woo-mynix-braintree/assets/vendor/Braintree/Result/Successful.php:31
- > 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)
Everything seems fine on the user side
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== woo-mynix-braintree ===
)
woo-mynix-braintree/woo-mynix-braintree-gateway.php 69% from 13 tests
This is the main PHP file of "Woo Braintree Payment" version 0.2-1 $..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-mynix-braintree.php" instead of "woo-mynix-braintree-gateway.php")
- Description: A good plugin description is longer than 10 characters (currently 0 characters long)
- Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "0.2-1 $...")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
- Do not distribute dangerous files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/woo-mynix-braintree/assets/vendor/ssl/api_braintreegateway_com.ca.crt
- ☣ wp-content/plugins/woo-mynix-braintree/assets/vendor/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 |
---|---|---|---|---|
PHP | 191 | 2,050 | 5,969 | 15,262 |
JavaScript | 8 | 1 | 33 | 412 |
CSS | 4 | 2 | 66 | 387 |
Ruby | 1 | 17 | 0 | 64 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 5.91 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 155.00 |
Average method complexity | 1.78 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 11 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 278 | |
▷ Abstract classes | 4 | 1.44% |
▷ Concrete classes | 274 | 98.56% |
▷ Final classes | 18 | 6.57% |
Methods | 1,728 | |
▷ Static methods | 723 | 41.84% |
▷ Public methods | 1,416 | 81.94% |
▷ Protected methods | 112 | 6.48% |
▷ Private methods | 200 | 11.57% |
Functions | 20 | |
▷ Named functions | 16 | 80.00% |
▷ Anonymous functions | 4 | 20.00% |
Constants | 1,268 | |
▷ Global constants | 20 | 1.58% |
▷ Class constants | 1,248 | 98.42% |
▷ Public constants | 1,248 | 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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/pro-icon.png | 5.80KB | 2.77KB | ▼ 52.18% |
assets/img/cc-badge.png | 6.40KB | 2.88KB | ▼ 54.92% |
assets/img/icon-128x128.png | 18.26KB | 6.13KB | ▼ 66.46% |
assets/img/pci-badge.png | 4.19KB | 2.21KB | ▼ 47.40% |