89% woo-checkout-for-digital-goods

Code Review | Digital Goods for WooCommerce Checkout

WordPress plugin Digital Goods for WooCommerce Checkout scored89%from 54 tests.

About plugin

  • Plugin page: woo-checkout-for-...
  • Plugin version: 3.7.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 212
  • Update frequency: every 13.8 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

6,000+ active /148,889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.50ms] Passed 4 tests

Server-side resources used by Digital Goods for WooCommerce Checkout
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.90 ▲0.72
Dashboard /wp-admin3.34 ▼0.0046.15 ▼14.23
Posts /wp-admin/edit.php3.40 ▲0.0447.07 ▼0.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.37 ▼9.96
Media Library /wp-admin/upload.php3.27 ▲0.0431.50 ▼5.48

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 221 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Digital Goods for WooCommerce Checkout
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8114.17 ▼0.201.94 ▲0.3743.64 ▲3.14
Dashboard /wp-admin2,208 ▲315.52 ▼0.1585.31 ▼11.4039.06 ▲1.83
Posts /wp-admin/edit.php2,093 ▼101.98 ▲0.0334.76 ▼5.9733.88 ▼2.46
Add New Post /wp-admin/post-new.php1,540 ▲1423.36 ▼0.19649.84 ▼45.8057.65 ▲2.85
Media Library /wp-admin/upload.php1,416 ▲164.15 ▼0.0594.07 ▼17.8942.24 ▼5.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

woo-checkout-for-digital-goods/woo-checkout-for-digital-goods.php 92% from 13 tests

The main PHP file in "Digital Goods for WooCommerce Checkout" ver. 3.7.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.5")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin37,006 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1348,28717,88335,019
PO File55516811,348
CSS182436341
JavaScript65074292
SVG1006

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity79.03
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,317
▷ Static methods20115.26%
▷ Public methods91269.25%
▷ Protected methods171.29%
▷ Private methods38829.46%
Functions117
▷ Named functions11699.15%
▷ Anonymous functions10.85%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 1.05MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/getting-started/Getting_Started_04.png153.84KB45.22KB▼ 70.60%
admin/images/woo-digital-goods-checkout-icon.png8.57KB3.12KB▼ 63.56%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/images/getting-started/Getting_Started_01.png272.23KB95.85KB▼ 64.79%
admin/images/getting-started/Getting_Started_03.png426.96KB149.75KB▼ 64.93%