93% gokada-delivery-for-woocommerce

Code Review | Gokada Delivery for WooCommerce

WordPress plugin Gokada Delivery for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: gokada-delivery-f...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Nov 12, 2020
  • Latest release: Jul 12, 2021
  • Number of updates: 8
  • Update frequency: every 30.4 days
  • Top authors: gokadang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 468 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼172.51ms] Passed 4 tests

Server-side resources used by Gokada Delivery for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0347.77 ▲2.75
Dashboard /wp-admin3.09 ▲0.0451.44 ▼7.69
Posts /wp-admin/edit.php3.14 ▲0.0453.12 ▼0.30
Add New Post /wp-admin/post-new.php5.45 ▲0.02100.23 ▼681.07
Media Library /wp-admin/upload.php3.04 ▲0.0333.54 ▼0.97

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Gokada Delivery for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲12516.00 ▲0.7112.65 ▲2.0052.62 ▲3.02
Dashboard /wp-admin3,004 ▲736.00 ▲0.08158.54 ▼14.57114.37 ▼10.19
Posts /wp-admin/edit.php2,759 ▲202.71 ▼0.0076.17 ▼4.8698.40 ▼4.56
Add New Post /wp-admin/post-new.php1,694 ▲7918.66 ▼2.65412.01 ▲105.04114.97 ▲4.03
Media Library /wp-admin/upload.php1,825 ▲185.05 ▲0.02153.65 ▼31.83135.38 ▲9.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gokada-delivery-for-woocommerce/wcommerce-gokada-delivery.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

gokada-delivery-for-woocommerce/wcommerce-gokada-delivery.php 92% from 13 tests

The principal PHP file in "Gokada Delivery for WooCommerce" v. 1.3.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gokada-delivery-for-woocommerce.php" instead of "wcommerce-gokada-delivery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,153 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5234379935
JavaScript2200137
Markdown144070
CSS12011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.80
▷ Minimum class complexity4.00
▷ Maximum class complexity51.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods63
▷ Static methods46.35%
▷ Public methods5688.89%
▷ Protected methods711.11%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.87MB with 0.58MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/gokada.png6.51KB2.57KB▼ 60.46%
assets/screenshots/screenshot-2.png422.87KB121.89KB▼ 71.18%
assets/screenshots/screenshot-3.png184.88KB71.06KB▼ 61.56%
assets/screenshots/screenshot-1.png279.83KB81.69KB▼ 70.81%