90% woo-payment-on-delivery

Code Review | Payment On Delivery for WooCommerce

WordPress plugin Payment On Delivery for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-payment-on-de...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: Apr 22, 2023
  • Number of updates: 343
  • Update frequency: every 6.5 days
  • Top authors: carlosramosweb (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

800+ active /19,917 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.42ms] Passed 4 tests

Analyzing server-side resources used by Payment On Delivery for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.51 ▼6.35
Dashboard /wp-admin3.38 ▲0.0749.68 ▼3.60
Posts /wp-admin/edit.php3.43 ▲0.0750.40 ▼3.53
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.44 ▼4.18
Media Library /wp-admin/upload.php3.30 ▲0.0741.42 ▲3.82

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment On Delivery for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼1.081.75 ▼0.4646.24 ▼0.08
Dashboard /wp-admin2,221 ▲185.87 ▲0.05108.26 ▼3.9140.30 ▼0.82
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0435.19 ▼3.0634.34 ▲3.63
Add New Post /wp-admin/post-new.php1,545 ▲1323.18 ▼0.20626.43 ▼24.1952.87 ▲1.14
Media Library /wp-admin/upload.php1,397 ▼34.25 ▼0.02103.47 ▼5.1247.39 ▼0.82

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% 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: payment, money, checkout, pizza, delivery...

woo-payment-on-delivery/woo-payment-on-delivery.php 92% from 13 tests

The entry point to "Payment On Delivery for WooCommerce" version 1.4.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5" instead of "3.5.0")

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 detected908 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28485601
PO File2122132307

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity11.33
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon-types-delivery.png2.99KB1.77KB▼ 40.96%