99% wc-digital-goods-checkout

Code Review | Digital Goods Checkout on WooCommerce

WordPress plugin Digital Goods Checkout on WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: wc-digital-goods-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 5.8.1
  • First release: Feb 10, 2016
  • Latest release: Aug 11, 2020
  • Number of updates: 7
  • Update frequency: every 235.4 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

900+ active / 8,967 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.59ms] Passed 4 tests

This is a short check of server-side resources used by Digital Goods Checkout on WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0234.86 ▲0.99
Dashboard /wp-admin3.07 ▲0.0243.04 ▲2.04
Posts /wp-admin/edit.php3.13 ▲0.0245.53 ▲9.06
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.74 ▼562.30
Media Library /wp-admin/upload.php3.02 ▲0.0230.97 ▼3.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Digital Goods Checkout on WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.86 ▲0.219.37 ▲0.0345.47 ▼1.11
Dashboard /wp-admin2,973 ▲425.96 ▼0.05136.95 ▼20.70113.48 ▲6.87
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0065.32 ▼3.2789.46 ▼2.61
Add New Post /wp-admin/post-new.php1,500 ▼018.48 ▼0.06362.88 ▼6.12114.51 ▲10.70
Media Library /wp-admin/upload.php1,807 ▲35.05 ▼0.01146.78 ▲6.67123.12 ▼1.42

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 Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce, digital goods, virtual products

wc-digital-goods-checkout/wc-digital-goods-checkout.php 77% from 13 tests

The principal PHP file in "Digital Goods Checkout on WooCommerce" v. 1.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1176355

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods466.67%
▷ Protected methods116.67%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected