90% wc-cash-on-pickup

Code Review | WooCommerce Cash On Pickup

WordPress plugin WooCommerce Cash On Pickup scored90%from 54 tests.

About plugin

  • Plugin page: wc-cash-on-pickup
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2014
  • Latest release: Oct 3, 2023
  • Number of updates: 28
  • Update frequency: every 121.2 days
  • Top authors: mariankadanka (92.86%)pinchofcode (10.71%)

Code review

54 tests

User reviews

17 reviews

Install metrics

9,000+ active /52,872 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.07ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Cash On Pickup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.45 ▲2.15
Dashboard /wp-admin3.32 ▼0.0344.33 ▼16.20
Posts /wp-admin/edit.php3.37 ▲0.0146.30 ▼5.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.46 ▼10.63
Media Library /wp-admin/upload.php3.24 ▲0.0134.11 ▼0.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Cash On Pickup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.371.59 ▼0.2638.50 ▼2.57
Dashboard /wp-admin2,195 ▲175.52 ▼0.1583.85 ▼21.8638.11 ▼1.85
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0138.89 ▼5.1034.55 ▼5.71
Add New Post /wp-admin/post-new.php1,526 ▼423.02 ▼0.14692.28 ▲41.7558.03 ▼5.40
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.1093.60 ▼22.3239.55 ▼9.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Cash on Pickup settings page) image missing
You can take inspiration from this readme.txt

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

The primary PHP file in "WooCommerce Cash On Pickup" version 1.7.0 is used by WordPress to initiate all plugin functionality
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 review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected379 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP283196295
PO File1273175
XML1009

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods753.85%
▷ Protected methods17.69%
▷ Private methods538.46%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ 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%