10% cod-confirmation-for-india

Code Review | COD Order Confirmation for India

WordPress plugin COD Order Confirmation for India scored10%from 54 tests.

About plugin

  • Plugin page: cod-confirmation-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6.35+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: Nov 29, 2023
  • Number of updates: 41
  • Update frequency: every 49.7 days
  • Top authors: softpulseinfotech (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /3,580 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > User error in wp-content/plugins/cod-confirmation-for-india/muyplg.php+48
    Please install woocommerce before activating.

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.07ms] 75% from 4 tests

Server-side resources used by COD Order Confirmation for India
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,909.86ms on /wp-admin/admin.php?page=Orders)
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.37 ▼0.74
Dashboard /wp-admin3.38 ▲0.0844.39 ▼7.37
Posts /wp-admin/edit.php3.50 ▲0.1448.47 ▲2.40
Add New Post /wp-admin/post-new.php5.96 ▲0.0891.45 ▼2.66
Media Library /wp-admin/upload.php3.31 ▲0.0832.97 ▼1.52
Transactions /wp-admin/admin.php?page=transactions3.292,112.27
Help /wp-admin/admin.php?page=help3.29249.87
COD Orders /wp-admin/admin.php?page=Orders3.291,909.86
COD Settings /wp-admin/admin.php?page=COD_confirm3.4047.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: 1 new table, 6 new options
New tables
wp_COD_settings
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

COD Order Confirmation for India: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8514.35 ▼0.251.66 ▲0.0343.60 ▼1.82
Dashboard /wp-admin2,249 ▲684.92 ▼0.7593.97 ▼6.1843.88 ▲2.95
Posts /wp-admin/edit.php2,160 ▲602.50 ▲0.5041.71 ▲5.8733.11 ▼3.33
Add New Post /wp-admin/post-new.php1,575 ▲4923.39 ▼0.08668.36 ▲10.5349.89 ▼2.98
Media Library /wp-admin/upload.php1,451 ▲544.52 ▲0.2296.46 ▼4.8340.42 ▼7.81
Transactions /wp-admin/admin.php?page=transactions1,0122.7352.7938.20
Help /wp-admin/admin.php?page=help8312.0326.3423.35
COD Orders /wp-admin/admin.php?page=Orders1,0702.4850.5032.54
COD Settings /wp-admin/admin.php?page=COD_confirm1,6462.2137.9265.13

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=COD_confirm
    • > Notice in wp-content/plugins/cod-confirmation-for-india/cod_setting.php+92
    Trying to access array offset on value of type int
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=COD_confirm
    • > Notice in wp-content/plugins/cod-confirmation-for-india/cod_setting.php+292
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=COD_confirm
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can look at the official readme.txt

cod-confirmation-for-india/muyplg.php 85% from 13 tests

The primary PHP file in "COD Order Confirmation for India" version 1.2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cod-confirmation-for-india.php" instead of "muyplg.php")

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
There were no executable files found in this plugin3,815 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS4601352,109
PHP973531,546
JavaScript104160

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
23 PNG files occupy 0.30MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
images/forward_enabled_hover.png1.35KB0.58KB▼ 56.93%
images/back_enabled_hover.png1.34KB0.60KB▼ 55.56%
images/sms_settings.png117.57KB40.54KB▼ 65.52%