Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.08MB] [CPU: ▼0.33ms] Passed 4 tests
Server-side resources used by GlobalPayments WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 34.61 ▼7.33 |
Dashboard /wp-admin | 3.38 ▲0.08 | 48.25 ▲2.22 |
Posts /wp-admin/edit.php | 3.50 ▲0.14 | 48.08 ▲1.01 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 94.60 ▲7.67 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 33.90 ▲2.80 |
Server storage [IO: ▲5.30MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 788 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
GlobalPayments WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.72 ▲0.37 | 1.71 ▲0.01 | 38.05 ▼6.58 |
Dashboard /wp-admin | 2,198 ▲18 | 5.62 ▼0.03 | 94.95 ▲0.20 | 41.77 ▲0.13 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.03 ▲0.01 | 39.71 ▲0.85 | 33.95 ▲3.19 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.19 ▲0.03 | 637.05 ▼14.27 | 51.72 ▲0.69 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.23 ▲0.04 | 96.04 ▼5.80 | 44.20 ▲0.82 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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 fix the following
- 23× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/google-pay/charge.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/gp-ecom/hpp/response-endpoint.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/gp-ecom/3DS2-Challenge/with-GP-js-library/index.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/manual-tokenize/charge.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/gp-api/end-to-end/authorization.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/gift/charge.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/iframe-recurring-signup/recurring.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/pay-invoice/charge.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/point-of-sale/e3-swipe/charge.php
- > /wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/echeck/process.php
- 545× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GlobalPayments\\Api\\Entities\\Enum' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/src/Entities/Enums/DepositSortProperty.php:9
- > PHP Fatal error
Uncaught Error: Class 'GlobalPayments\\WooCommercePaymentGatewayProvider\\Gateways\\Handlers\\AbstractHandler' not found in wp-content/plugins/global-payments-woocommerce/src/Gateways/Handlers/DelayedAuthorizationHandler.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/test/Integration/Gateways/GpEcomConnector/ApmTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/test/Integration/Gateways/TransITConnector/TransITTests.php:17
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/test/Integration/Gateways/TransITConnector/Certification/Ecommerce_3.php:29
- > PHP Fatal error
Uncaught Error: Class 'GlobalPayments\\Api\\PaymentMethods\\EBT' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/src/PaymentMethods/EBTCardData.php:8
- > PHP Fatal error
Uncaught Error: Class 'Locale' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/src/Utils/StringUtils.php:56
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditTest.php:24
- > PHP Fatal error
Uncaught Error: Class 'GlobalPayments\\Api\\Entities\\Enum' not found in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/src/Entities/Enums/ReasonCode.php:13
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/examples/portico/pay-invoice/charge.php on line 26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Tags: You are using too many tags: 17 tag instead of maximum 10
global-payments-woocommerce/globalpayments-gateway-provider-for-woocommerce.php 85% from 13 tests
Analyzing the main PHP file in "GlobalPayments WooCommerce" version 1.9.5
The following require your attention:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)
- Main file name: Name the main plugin file the same as the plugin slug ("global-payments-woocommerce.php" instead of "globalpayments-gateway-provider-for-woocommerce.php")
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please fix the following items
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/global-payments-woocommerce/vendor/globalpayments/php-sdk/test/Integration/Gateways/ProPay/TestData/selfSignedCertificate.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 701 | 17,275 | 17,408 | 83,393 |
JavaScript | 22 | 721 | 1,428 | 5,951 |
HTML | 12 | 74 | 13 | 1,600 |
Markdown | 5 | 213 | 0 | 685 |
JSON | 4 | 0 | 0 | 221 |
CSS | 6 | 17 | 0 | 148 |
XML | 4 | 0 | 10 | 47 |
YAML | 2 | 9 | 1 | 42 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Method cyclomatic complexity has to be reduced to less than 100 (currently 159)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 8.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 582.00 |
Average method complexity | 2.08 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 159.00 |
Code structure | ||
---|---|---|
Namespaces | 88 | |
Interfaces | 42 | |
Traits | 6 | |
Classes | 614 | |
▷ Abstract classes | 30 | 4.89% |
▷ Concrete classes | 584 | 95.11% |
▷ Final classes | 7 | 1.20% |
Methods | 4,845 | |
▷ Static methods | 339 | 7.00% |
▷ Public methods | 4,412 | 91.06% |
▷ Protected methods | 178 | 3.67% |
▷ Private methods | 255 | 5.26% |
Functions | 66 | |
▷ Named functions | 22 | 33.33% |
▷ Anonymous functions | 44 | 66.67% |
Constants | 1,540 | |
▷ Global constants | 3 | 0.19% |
▷ Class constants | 1,537 | 99.81% |
▷ Public constants | 1,537 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.58MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/globalpayments/php-sdk/examples/portico/end-to-end/assets/images/ss-savedcards-amex@2x.png | 46.21KB | 10.54KB | ▼ 77.19% |
vendor/globalpayments/php-sdk/examples/portico/point-of-sale/e3-swipe/assets/oranges.png | 80.92KB | 21.72KB | ▼ 73.16% |
vendor/globalpayments/php-sdk/examples/portico/end-to-end/assets/images/ss-shield@1x.png | 35.75KB | 11.04KB | ▼ 69.12% |
vendor/globalpayments/php-sdk/examples/portico/end-to-end/assets/images/ss-saved-mastercard@2x.png | 29.93KB | 6.56KB | ▼ 78.09% |
vendor/globalpayments/php-sdk/examples/portico/end-to-end/assets/images/ss-shield-ie.png | 30.72KB | 4.13KB | ▼ 86.56% |