Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.32MB] [CPU: ▼4.24ms] Passed 4 tests
Analyzing server-side resources used by Braintree Payments For Wordpress - Accept Payments WP
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.77 ▲0.30 | 47.91 ▲8.60 |
Dashboard /wp-admin | 3.67 ▲0.36 | 51.18 ▲2.89 |
Posts /wp-admin/edit.php | 3.72 ▲0.36 | 46.75 ▼7.63 |
Add New Post /wp-admin/post-new.php | 6.21 ▲0.32 | 86.57 ▼13.16 |
Media Library /wp-admin/upload.php | 3.53 ▲0.29 | 39.90 ▲0.95 |
Add New Payment Form /wp-admin/post-new.php?post_type=accept_payments_wp | 3.57 | 47.08 |
24/7 Support And Feature Request /wp-admin/edit.php?post_type=accept_payments_wp&page=accept_payments_wp_support | 3.50 | 35.02 |
Settings /wp-admin/edit.php?post_type=accept_payments_wp&page=accept_payments_wp_settings | 3.50 | 36.20 |
Payment Forms /wp-admin/edit.php?post_type=accept_payments_wp | 3.57 | 41.53 |
Server storage [IO: ▲1.71MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 334 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Braintree Payments For Wordpress - Accept Payments WP
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,833 ▲72 | 14.35 ▲0.00 | 1.58 ▼0.36 | 41.71 ▼3.12 |
Dashboard /wp-admin | 2,236 ▲56 | 5.63 ▼0.05 | 91.71 ▲3.56 | 43.15 ▼1.40 |
Posts /wp-admin/edit.php | 2,144 ▲44 | 2.00 ▼0.03 | 35.08 ▼4.29 | 32.48 ▼5.17 |
Add New Post /wp-admin/post-new.php | 1,561 ▲33 | 23.45 ▲0.12 | 683.99 ▲16.21 | 61.70 ▲2.57 |
Media Library /wp-admin/upload.php | 1,444 ▲47 | 4.22 ▲0.05 | 99.42 ▼5.28 | 46.30 ▼5.67 |
Add New Payment Form /wp-admin/post-new.php?post_type=accept_payments_wp | 1,586 | 2.62 | 57.51 | 67.51 |
24/7 Support And Feature Request /wp-admin/edit.php?post_type=accept_payments_wp&page=accept_payments_wp_support | 833 | 1.99 | 25.34 | 40.37 |
Settings /wp-admin/edit.php?post_type=accept_payments_wp&page=accept_payments_wp_settings | 1,018 | 2.05 | 25.58 | 28.46 |
Payment Forms /wp-admin/edit.php?post_type=accept_payments_wp | 1,130 | 1.97 | 30.64 | 33.66 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Uninstall procedure validation failed for this plugin
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_wp_plugin' not found or invalid function name
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+22
Illegal string offset 'price'
- 4 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+101
Cannot assign an empty string to a string offset
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+88
Illegal string offset 'description'
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+51
Illegal string offset 'success_page_url'
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+60
Illegal string offset 'failure_page_url'
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+41
Illegal string offset 'button_text'
- > GET request to /wp-admin/post-new.php?post_type=accept_payments_wp
- > Warning in wp-content/plugins/accept-payments-wp/includes/core/AcceptPaymentsWPMetaBoxes.php+31
Illegal string offset 'item_description'
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
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/accept-payments-wp/templates/admin/support.php
- 206× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Http' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/lib/Braintree/Result/Error.php:36
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Http' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/lib/Braintree/Exception/InvalidSignature.php:6
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Http' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Http' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/lib/Braintree/Exception/TestOperationPerformedInProduction.php:12
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Http' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/tests/integration/HttpClientApi.php:9
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Instance' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/lib/Braintree/Transaction/MasterpassCardDetails.php:36
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Exception' not found in wp-content/plugins/accept-payments-wp/vendor/braintree/braintree_php/lib/Braintree/Exception/Connection.php:13
- > 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 issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Tags: You are using too many tags: 12 tag instead of maximum 10
- Requires php: Version not formatted correctly
accept-payments-wp/accept-payments-wp.php Passed 13 tests
Analyzing the main PHP file in "Braintree Payments For Wordpress - Accept Payments WP" version 1.2.1
58 characters long description:
Easily accept Braintree Payments on your Wordpress website
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
It is important to fix the following items
- Do not distribute dangerous files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/accept-payments-wp/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 | 303 | 5,318 | 5,574 | 35,652 |
Markdown | 6 | 216 | 0 | 590 |
CSS | 3 | 16 | 10 | 102 |
JSON | 2 | 0 | 0 | 87 |
Ruby | 1 | 17 | 0 | 64 |
JavaScript | 2 | 14 | 4 | 56 |
XML | 1 | 2 | 0 | 22 |
Dockerfile | 1 | 4 | 1 | 9 |
Bourne Shell | 1 | 3 | 0 | 8 |
make | 1 | 2 | 0 | 8 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.08 |
Average class complexity | 4.51 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 163.00 |
Average method complexity | 1.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 26 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 294 | |
▷ Abstract classes | 2 | 0.68% |
▷ Concrete classes | 292 | 99.32% |
▷ Final classes | 1 | 0.34% |
Methods | 2,391 | |
▷ Static methods | 490 | 20.49% |
▷ Public methods | 2,164 | 90.51% |
▷ Protected methods | 100 | 4.18% |
▷ Private methods | 127 | 5.31% |
Functions | 20 | |
▷ Named functions | 3 | 15.00% |
▷ Anonymous functions | 17 | 85.00% |
Constants | 871 | |
▷ Global constants | 6 | 0.69% |
▷ Class constants | 865 | 99.31% |
▷ Public constants | 865 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/braintree/braintree_php/tests/fixtures/bt_logo.png | 2.39KB | 2.26KB | ▼ 5.32% |
assets/images/icon-coin.png | 0.64KB | 0.56KB | ▼ 13.03% |