94% pal-digital-goods-express-checkout-for-woo

Code Review | PayPal Digital Goods For Woocommerce

WordPress plugin PayPal Digital Goods For Woocommerce scored 94% from 54 tests.

About plugin

  • Plugin page: pal-digital-goods...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 5.9.2
  • First release: Aug 17, 2016
  • Latest release: Aug 17, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wppaypalcontact (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,894 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼301.13ms] Passed 4 tests

A check of server-side resources used by PayPal Digital Goods For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1462.34 ▲5.34
Dashboard /wp-admin3.50 ▲0.0838.37 ▲0.83
Posts /wp-admin/edit.php3.72 ▲0.0841.92 ▼1.62
Add New Post /wp-admin/post-new.php6.96 ▼0.02100.93 ▼1,190.99
Media Library /wp-admin/upload.php3.37 ▲0.0728.59 ▼12.73

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by PayPal Digital Goods For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.68 ▲0.055.96 ▼0.192.43 ▼0.11
Dashboard /wp-admin2,888 ▲306.11 ▼0.03132.33 ▼3.49159.48 ▼3.04
Posts /wp-admin/edit.php2,691 ▲33.24 ▼0.0065.04 ▼1.45144.02 ▼4.26
Add New Post /wp-admin/post-new.php1,690 ▼520.96 ▼1.52419.85 ▼40.82160.03 ▼1.24
Media Library /wp-admin/upload.php1,698 ▼05.49 ▼0.03149.90 ▼31.19183.33 ▼49.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pal-digital-goods-express-checkout-for-woo/includes/class-woo-paypal-digital-goods-express-checkout-gateway.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: ecommerce, paypal digital goods, e-commerce, paypal payment, express checkout...

pal-digital-goods-express-checkout-for-woo/woo-paypal-digital-goods-express-checkout.php 85% from 13 tests

"PayPal Digital Goods For Woocommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pal-digital-goods-express-checkout-for-woo.php" instead of "woo-paypal-digital-goods-express-checkout.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,236 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP101213521,124
CSS11068
JavaScript11044

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.17
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods24.00%
▷ Public methods4692.00%
▷ Protected methods00.00%
▷ Private methods48.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin