100% wc-cash-on-pickup

Code Review | WooCommerce Cash On Pickup

WordPress plugin WooCommerce Cash On Pickup scored 100% from 54 tests.

About plugin

  • Plugin page: wc-cash-on-pickup
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 5.9.2
  • First release: Jun 18, 2014
  • Latest release: Nov 17, 2020
  • Number of updates: 24
  • Update frequency: every 97.7 days
  • Top authors: mariankadanka (91.67%)pinchofcode (12.5%)

Code review

54 tests

User reviews

14 reviews

Install metrics

9,000+ active / 37,460 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by WooCommerce Cash On Pickup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0272.96 ▲8.47
Dashboard /wp-admin3.42 ▲0.0136.23 ▼6.12
Posts /wp-admin/edit.php3.65 ▲0.0145.73 ▲1.94
Add New Post /wp-admin/post-new.php6.89 ▼0.08107.64 ▼1,161.83
Media Library /wp-admin/upload.php3.30 ▲0.0137.58 ▲1.83

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Cash On Pickup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.90 ▲0.139.67 ▲2.643.16 ▲0.09
Dashboard /wp-admin2,895 ▲346.09 ▼0.06139.10 ▼38.03180.57 ▼14.37
Posts /wp-admin/edit.php2,685 ▼63.24 ▼0.0077.70 ▲1.79181.64 ▲2.05
Add New Post /wp-admin/post-new.php1,674 ▲3522.24 ▲1.97535.63 ▼59.23194.67 ▼26.10
Media Library /wp-admin/upload.php1,695 ▲35.50 ▼0.04188.91 ▼15.91222.38 ▼32.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Cash on Pickup settings page) image not found
The official readme.txt might help

wc-cash-on-pickup/wc-cash-on-pickup.php Passed 13 tests

The main PHP script in "WooCommerce Cash On Pickup" version 1.6 is automatically included on every request by WordPress
70 characters long description:
A WooCommerce Extension that adds the payment gateway "Cash On Pickup"

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
Everything looks great! No dangerous files found in this plugin372 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File1273175

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity5.54
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods753.85%
▷ Protected methods17.69%
▷ Private methods538.46%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.03KB16.21KB▼ 57.37%