Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.14MB] [CPU: ▼4.31ms] Passed 4 tests
An overview of server-side resources used by WooCommerce PayPal Payments
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.15 | 43.64 ▲4.00 |
Dashboard /wp-admin | 3.45 ▲0.14 | 49.51 ▼0.72 |
Posts /wp-admin/edit.php | 3.56 ▲0.20 | 46.58 ▼3.44 |
Add New Post /wp-admin/post-new.php | 6.03 ▲0.14 | 88.43 ▼16.94 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 37.91 ▲3.86 |
Server storage [IO: ▲10.54MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 768 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
woocommerce-ppcp-version |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by WooCommerce PayPal Payments
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,797 ▲35 | 14.72 ▲0.38 | 1.73 ▼0.03 | 42.74 ▼1.41 |
Dashboard /wp-admin | 2,199 ▲19 | 5.56 ▼0.05 | 85.91 ▼17.27 | 37.57 ▼6.76 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 1.95 ▲0.01 | 38.28 ▲0.99 | 35.39 ▼2.48 |
Add New Post /wp-admin/post-new.php | 1,533 ▲7 | 23.30 ▲0.24 | 661.47 ▲13.16 | 50.55 ▼12.40 |
Media Library /wp-admin/upload.php | 1,407 ▲16 | 4.23 ▲0.08 | 106.57 ▲4.84 | 45.66 ▲3.11 |
Uninstaller [IO: ▲10.54MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the followingThe uninstall procedure has failed, leaving 8 options in the database
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php+24
Constant PAYPAL_API_URL already defined
- Uninstaller has failed for this plugin, leaving 768 files (10.54MB) in the plugin directory
- (new file) lib/packages/Dhii/Collection/ContainerInterface.php
- (new file) lib/common/Pattern/SingletonDecorator.php
- (new file) lib/packages/Dhii/Collection/ClearableContainerInterface.php
- (new file) api/order-functions.php
- (new file) LICENSE
- (new file) changelog.txt
- (new file) lib/packages/Dhii/Collection/ContainerFactoryInterface.php
- (new file) lib/common/Pattern/SingletonTrait.php
- (new file) bootstrap.php
- (new file) lib/packages/Dhii/Collection/CountableListInterface.php
- ...
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- recovery_mode_email_last_sent
- db_upgraded
- can_compress_scripts
- woocommerce-ppcp-version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/woocommerce-paypal-payments/uninstall.php
- 193× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\Vendor\\Dhii\\Modular\\Module\\ModuleInterface' not found in wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-status-report/src/StatusReportModule.php:29
- > PHP Fatal error
Trait 'WooCommerce\\PayPalCommerce\\Button\\Helper\\ContextTrait' not found in wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php on line 24
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\Vendor\\Interop\\Container\\ServiceProviderInterface' not found in wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/ServiceProvider.php:14
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/woocommerce-paypal-payments/vendor/dhii/validation-interface/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-paypal-payments/vendor/dhii/validation-interface/tests/bootstrap.php on line 8
- > PHP Fatal error
Uncaught Error: Interface 'WpOop\\WordPress\\Plugin\\PluginInterface' not found in wp-content/plugins/woocommerce-paypal-payments/src/Plugin.php:18
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\ApiClient\\Authentication\\Bearer' not found in wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Authentication/PayPalBearer.php:22
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\Vendor\\Dhii\\Collection\\ContainerInterface' not found in wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CachingContainer.php:20
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\Vendor\\Dhii\\Collection\\ContainerInterface' not found in wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Collection/WritableContainerInterface.php:12
- > PHP Fatal error
Trait 'WooCommerce\\PayPalCommerce\\ApiClient\\Endpoint\\RequestTrait' not found in wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Endpoint/BillingPlans.php on line 24
- > PHP Fatal error
Uncaught Error: Interface 'WooCommerce\\PayPalCommerce\\Webhooks\\Handler\\RequestHandler' not found in wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-webhooks/src/Handler/PaymentCaptureCompleted.php:23
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Tags: You are using too many tags: 12 tag instead of maximum 10
woocommerce-paypal-payments/woocommerce-paypal-payments.php 85% from 13 tests
The principal PHP file in "WooCommerce PayPal Payments" v. 2.4.1 is loaded by WordPress automatically on each request
You should first fix the following items:
- Requires at least: Required version does not match the one declared in readme.txt ("5.3" instead of "3.9")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 311 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin50,641 lines of code in 701 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 528 | 8,036 | 22,238 | 40,232 |
JavaScript | 120 | 1,297 | 296 | 6,739 |
JSON | 3 | 0 | 0 | 2,239 |
Sass | 9 | 113 | 0 | 509 |
XML | 6 | 22 | 6 | 423 |
SVG | 21 | 0 | 2 | 363 |
Markdown | 3 | 25 | 0 | 74 |
YAML | 1 | 2 | 0 | 29 |
Dockerfile | 1 | 13 | 2 | 24 |
CSS | 9 | 0 | 0 | 9 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 8.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 203.00 |
Average method complexity | 2.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 110 | |
Interfaces | 67 | |
Traits | 19 | |
Classes | 358 | |
▷ Abstract classes | 3 | 0.84% |
▷ Concrete classes | 355 | 99.16% |
▷ Final classes | 2 | 0.56% |
Methods | 1,907 | |
▷ Static methods | 85 | 4.46% |
▷ Public methods | 1,533 | 80.39% |
▷ Protected methods | 176 | 9.23% |
▷ Private methods | 198 | 10.38% |
Functions | 662 | |
▷ Named functions | 15 | 2.27% |
▷ Anonymous functions | 647 | 97.73% |
Constants | 374 | |
▷ Global constants | 11 | 2.94% |
▷ Class constants | 363 | 97.06% |
▷ Public constants | 349 | 96.14% |
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.29MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
modules/ppcp-wc-gateway/assets/images/button-Google-Pay.png | 4.81KB | 3.10KB | ▼ 35.55% |
modules/ppcp-wc-gateway/assets/images/paypal.png | 28.27KB | 13.28KB | ▼ 53.03% |
modules/ppcp-wc-gateway/assets/images/button-Apple-Pay.png | 7.01KB | 2.98KB | ▼ 57.46% |
modules/ppcp-onboarding/assets/images/cards-screen-acdc.png | 166.57KB | 72.16KB | ▼ 56.68% |
modules/ppcp-onboarding/assets/images/cards-screen-basic.png | 89.25KB | 77.75KB | ▼ 12.88% |