Benchmarks
Plugin footprint 83% 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 gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼3.72ms] Passed 4 tests
Analyzing server-side resources used by Payment Gateway for PayPal on WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 38.06 ▼5.63 |
Dashboard /wp-admin | 3.34 ▲0.04 | 49.98 ▼0.99 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 47.70 ▼2.69 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 92.67 ▼5.55 |
Media Library /wp-admin/upload.php | 3.26 ▲0.04 | 34.31 ▼0.64 |
Server storage [IO: ▲3.16MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 785 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Payment Gateway for PayPal on WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,833 ▲87 | 13.60 ▼0.99 | 1.54 ▼0.34 | 37.71 ▼5.83 |
Dashboard /wp-admin | 2,239 ▲61 | 4.88 ▼0.05 | 111.18 ▲6.12 | 41.67 ▼7.26 |
Posts /wp-admin/edit.php | 2,125 ▲39 | 2.19 ▲0.19 | 40.68 ▲5.10 | 34.09 ▲2.73 |
Add New Post /wp-admin/post-new.php | 1,542 ▲14 | 17.79 ▼5.33 | 684.00 ▲19.45 | 62.76 ▲6.25 |
Media Library /wp-admin/upload.php | 1,421 ▲36 | 4.29 ▲0.08 | 98.65 ▼2.87 | 45.18 ▼2.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- db_upgraded
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
The smoke test was a success, however most plugin functionality was not tested
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
Please take a closer look at the following
- 379× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalResourceModel' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/lib/PayPal/Api/Templates.php:24
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/lib/PayPal/Api/Credit.php:17
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/braintree/lib/Braintree/OAuthAccessRevocation.php:11
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/lib/PayPal/Api/Tax.php:21
- > PHP Fatal error
Uncaught Error: Class 'SebastianBergmann\\Comparator\\Comparator' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/vendor/sebastian/comparator/src/TypeComparator.php:16
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-paypal-gateway/ppcp/includes/class-ppcp-paypal-checkout-for-woocommerce-request.php:9
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Api\\BankAccount' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/lib/PayPal/Api/ExtendedBankAccount.php:13
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/braintree/lib/Braintree/CreditCard.php:45
- > PHP Fatal error
Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/lib/PayPal/Api/Payee.php:17
- > PHP Fatal error
Uncaught Error: Class 'Braintree\\PartialMatchNode' not found in wp-content/plugins/woo-paypal-gateway/includes/php-library/braintree/lib/Braintree/TextNode.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in woo-paypal-gateway/assets to your readme.txt
woo-paypal-gateway/woo-paypal-gateway.php 92% from 13 tests
Analyzing the main PHP file in "Payment Gateway for PayPal on WooCommerce" version 7.1.8
Please take the time to fix the following:
- Requires at least: Required version must be the same as the one declared in readme.txt ("3.3" instead of "5.3")
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
- For security reasons, never distribute binary or executable files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/woo-paypal-gateway/includes/php-library/braintree/lib/ssl/api_braintreegateway_com.ca.crt
- .bat - Batch File in Windows
- ☣ wp-content/plugins/woo-paypal-gateway/includes/php-library/paypal-rest/vendor/bin/phpunit.bat
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 627 | 8,563 | 27,827 | 50,675 |
YAML | 37 | 164 | 89 | 3,427 |
JSON | 16 | 7 | 0 | 1,817 |
JavaScript | 11 | 6 | 0 | 1,399 |
Markdown | 17 | 432 | 0 | 1,191 |
CSS | 4 | 7 | 0 | 217 |
XML | 10 | 12 | 1 | 199 |
Ant | 6 | 22 | 0 | 147 |
Bourne Shell | 2 | 3 | 1 | 20 |
DOS Batch | 1 | 0 | 0 | 4 |
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 should be reduced to less than 100 (currently 110)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 8.88 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 390.00 |
Average method complexity | 2.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 110.00 |
Code structure | ||
---|---|---|
Namespaces | 68 | |
Interfaces | 26 | |
Traits | 4 | |
Classes | 578 | |
▷ Abstract classes | 7 | 1.21% |
▷ Concrete classes | 571 | 98.79% |
▷ Final classes | 12 | 2.10% |
Methods | 4,649 | |
▷ Static methods | 677 | 14.56% |
▷ Public methods | 4,277 | 92.00% |
▷ Protected methods | 102 | 2.19% |
▷ Private methods | 270 | 5.81% |
Functions | 95 | |
▷ Named functions | 57 | 60.00% |
▷ Anonymous functions | 38 | 40.00% |
Constants | 883 | |
▷ Global constants | 10 | 1.13% |
▷ Class constants | 873 | 98.87% |
▷ Public constants | 873 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/wpg_paypal.png | 2.71KB | 1.96KB | ▼ 27.93% |
assets/images/wpg_paypal-paypal-credit-card-logos.png | 19.75KB | 5.62KB | ▼ 71.56% |
assets/images/wpg_cards.png | 8.09KB | 3.33KB | ▼ 58.77% |
assets/images/wpg_paypal-credit-card-logos.png | 16.73KB | 5.74KB | ▼ 65.70% |
assets/images/wpg_PP_credit_logo.png | 2.85KB | 2.02KB | ▼ 29.18% |