84% wpc-paypal-express-checkout

Code Review | In-Context PayPal Express Checkout for WooCommerce

WordPress plugin In-Context PayPal Express Checkout for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wpc-paypal-expres...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: May 2, 2018
  • Latest release: Jan 7, 2023
  • Number of updates: 35
  • Update frequency: every 48.9 days
  • Top authors: wpcodelibrary (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,307 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.13ms] Passed 4 tests

Server-side resources used by In-Context PayPal Express Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2541.74 ▲2.02
Dashboard /wp-admin3.54 ▲0.2045.40 ▼14.33
Posts /wp-admin/edit.php3.66 ▲0.3047.30 ▲4.43
Add New Post /wp-admin/post-new.php6.12 ▲0.2495.00 ▲8.23
Media Library /wp-admin/upload.php3.47 ▲0.2434.45 ▼0.64

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for In-Context PayPal Express Checkout for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.66 ▼0.711.62 ▲0.0543.47 ▲1.33
Dashboard /wp-admin2,206 ▲184.85 ▼1.04109.47 ▲8.0242.40 ▲1.24
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0640.33 ▲4.4534.68 ▲0.04
Add New Post /wp-admin/post-new.php1,547 ▲1318.44 ▼5.08600.30 ▼81.7874.31 ▲22.38
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0595.94 ▼9.6343.98 ▼1.59

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpc-paypal-express-checkout/admin/partials/wpc-paypal-express-checkout-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("#")
The official readme.txt might help

wpc-paypal-express-checkout/wpc-paypal-express-checkout.php Passed 13 tests

The principal PHP file in "In-Context PayPal Express Checkout for WooCommerce" v. 1.2.2 is loaded by WordPress automatically on each request
76 characters long description:
The PayPal Express Checkout gives you a simplified best checkout experience.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,856 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP162253351,670
JavaScript2150169
CSS20517

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity29.60
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods80
▷ Static methods56.25%
▷ Public methods7695.00%
▷ Protected methods00.00%
▷ Private methods45.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin