79% wp-express-checkout

Code Review | WP Express Checkout (Accept PayPal Payments Easily)

WordPress plugin WP Express Checkout (Accept PayPal Payments Easily) scored79%from 54 tests.

About plugin

  • Plugin page: wp-express-checkout
  • Plugin version: 2.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Dec 24, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 106
  • Update frequency: every 13.6 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active /45,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.47MB] [CPU: ▲3.27ms] Passed 4 tests

Server-side resources used by WP Express Checkout (Accept PayPal Payments Easily)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7340.08 ▼3.31
Dashboard /wp-admin5.02 ▲1.6856.73 ▼6.61
Posts /wp-admin/edit.php5.15 ▲1.8061.00 ▲14.82
Add New Post /wp-admin/post-new.php7.62 ▲1.74103.12 ▲10.29
Media Library /wp-admin/upload.php4.98 ▲1.7548.06 ▲12.72
Tags /wp-admin/edit-tags.php?taxonomy=wpec_tags&post_type=ppec-products4.9947.13
Orders /wp-admin/edit.php?post_type=ppdgorder5.0147.37
Tools /wp-admin/edit.php?post_type=ppec-products&page=wpec-tools-page4.9943.06
Settings /wp-admin/edit.php?post_type=ppec-products&page=ppec-settings-page4.9944.26
Coupons /wp-admin/edit.php?post_type=ppec-products&page=wpec-coupons4.9845.21
Products /wp-admin/edit.php?post_type=ppec-products5.0143.55
Categories /wp-admin/edit-tags.php?taxonomy=wpec_categories&post_type=ppec-products4.9943.77
Add New Product /wp-admin/post-new.php?post_type=ppec-products5.1656.23

Server storage [IO: ▲1.14MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 167 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
ppdg-settings
widget_recent-comments
wpec_plugin_user_feedback_notice
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Express Checkout (Accept PayPal Payments Easily)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20213.78 ▼0.928.71 ▲6.9337.17 ▼7.42
Dashboard /wp-admin2,254 ▲775.62 ▼0.0191.97 ▼9.2540.69 ▼3.78
Posts /wp-admin/edit.php2,139 ▲391.95 ▲0.0139.65 ▲1.8636.83 ▲1.10
Add New Post /wp-admin/post-new.php6,418 ▲4,89227.69 ▲4.46840.65 ▲144.4934.16 ▼16.98
Media Library /wp-admin/upload.php1,459 ▲654.24 ▲0.0194.31 ▼4.5243.77 ▲0.43
Tags /wp-admin/edit-tags.php?taxonomy=wpec_tags&post_type=ppec-products1,3022.1330.8232.26
Orders /wp-admin/edit.php?post_type=ppdgorder1,2322.2037.2132.40
Tools /wp-admin/edit.php?post_type=ppec-products&page=wpec-tools-page9952.0124.8829.23
Settings /wp-admin/edit.php?post_type=ppec-products&page=ppec-settings-page1,6946.86234.6049.28
Coupons /wp-admin/edit.php?post_type=ppec-products&page=wpec-coupons1,0632.1426.8529.41
Products /wp-admin/edit.php?post_type=ppec-products1,2021.9030.9434.60
Categories /wp-admin/edit-tags.php?taxonomy=wpec_categories&post_type=ppec-products1,3332.1329.0132.67
Add New Product /wp-admin/post-new.php?post_type=ppec-products3,2827.61185.0581.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ppdg-settings
    • wpec_plugin_user_feedback_notice
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-express-checkout/includes/integrations/woocommerce/class-woocommerce-gateway.php
    • > /wp-content/plugins/wp-express-checkout/public/views/public.php
  • 78× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PayPalCheckoutSdk\\Core\\PayPalEnvironment' not found in wp-content/plugins/wp-express-checkout/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/ProductionEnvironment.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Express_Checkout\\Order_Tags_Html' not found in wp-content/plugins/wp-express-checkout/public/includes/class-order-tags-plain.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Express_Checkout\\Shortcodes' not found in wp-content/plugins/wp-express-checkout/public/views/templates/content-product-default.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PayPalHttp\\HttpRequest' not found in wp-content/plugins/wp-express-checkout/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Payments/AuthorizationsReauthorizeRequest.php:14
    • > PHP Warning
      Class 'WP_Express_Checkout\\Payment_Processor' not found in wp-content/plugins/wp-express-checkout/vendor/deprecated.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-express-checkout/public/views/templates/payment-form.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Express_Checkout\\Shortcodes' not found in wp-content/plugins/wp-express-checkout/public/views/templates/content-product-2.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PayPalHttp\\HttpRequest' not found in wp-content/plugins/wp-express-checkout/vendor/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Payments/CapturesGetRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-express-checkout/public/views/templates/content-thank-you.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Express_Checkout\\Products\\Product' not found in wp-content/plugins/wp-express-checkout/includes/products/class-stub-product.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: checkout, digital store, payment, woocommerce, e-commerce...

wp-express-checkout/wp-express-checkout.php Passed 13 tests

The primary PHP file in "WP Express Checkout (Accept PayPal Payments Easily)" version 2.3.6 is used by WordPress to initiate all plugin functionality
128 characters long description:
This plugin allows you to create a customizable PayPal payment button that lets the customers pay quickly in a popup via PayPal.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin15,774 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122,1752,7779,699
CSS8459832,667
PO File17498151,870
JavaScript59630786
Sass51081625
JSON200126
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.64
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces14
Interfaces3
Traits0
Classes86
▷ Abstract classes33.49%
▷ Concrete classes8396.51%
▷ Final classes00.00%
Methods520
▷ Static methods10420.00%
▷ Public methods43784.04%
▷ Protected methods519.81%
▷ Private methods326.15%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/product-thumb-placeholder.png0.52KB0.53KB0.00%