83% woocommerce-gateway-paypal-express-checkout

Code Review | WooCommerce PayPal Checkout Payment Gateway

WordPress plugin WooCommerce PayPal Checkout Payment Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: woocommerce-gatew...
  • Plugin version: 2.1.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Sep 16, 2021
  • Number of updates: 125
  • Update frequency: every 16.0 days
  • Top authors: woothemes (44.8%)bor0 (32.8%)akeda (16%)pauldechov (4%)royho (4%)

Code review

54 tests

User reviews

104 reviews

Install metrics

200,000+ active / 14,495,649 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.79ms] Passed 4 tests

A check of server-side resources used by WooCommerce PayPal Checkout Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1044.49 ▼1.13
Dashboard /wp-admin3.40 ▲0.0952.23 ▼0.03
Posts /wp-admin/edit.php3.51 ▲0.1551.78 ▼6.45
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.46 ▲3.91
Media Library /wp-admin/upload.php3.32 ▲0.0936.61 ▼3.54

Server storage [IO: ▲0.70MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce PayPal Checkout Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5613.69 ▲0.472.14 ▲0.3043.84 ▲0.18
Dashboard /wp-admin2,226 ▲204.91 ▼0.99108.65 ▲6.3042.13 ▲1.58
Posts /wp-admin/edit.php2,112 ▲202.02 ▲0.0141.08 ▲2.5636.70 ▲0.32
Add New Post /wp-admin/post-new.php1,547 ▲2823.39 ▼0.07672.35 ▼31.0653.35 ▼4.86
Media Library /wp-admin/upload.php1,408 ▲204.22 ▲0.0198.29 ▼15.8341.06 ▼5.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • woocommerce_inbox_variant_assignment

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_url() in wp-content/plugins/woocommerce-gateway-paypal-express-checkout/templates/paypal-payments-upgrade-notice.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can look at the official readme.txt

woocommerce-gateway-paypal-express-checkout/woocommerce-gateway-paypal-express-checkout.php 85% from 13 tests

The entry point to "WooCommerce PayPal Checkout Payment Gateway" version 2.1.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.4" instead of "3.2.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin7,734 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity22.22
▷ Minimum class complexity1.00
▷ Maximum class complexity169.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
▷ Abstract classes36.52%
▷ Concrete classes4393.48%
▷ Final classes00.00%
▷ Static methods30.95%
▷ Public methods25480.38%
▷ Protected methods5718.04%
▷ Private methods51.58%
▷ Named functions11100.00%
▷ Anonymous functions00.00%
▷ Global constants33.37%
▷ Class constants8696.63%
▷ Public constants86100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/in-context-composite.png194.81KB85.32KB▼ 56.20%