72% gigl-delivery

Code Review | GIG Logistic Delivery for Woocommerce

WordPress plugin GIG Logistic Delivery for Woocommerce scored72%from 54 tests.

About plugin

  • Plugin page: gigl-delivery
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.8
  • WordPress version: 6.3.1
  • First release: Jan 27, 2022
  • Latest release: Feb 22, 2022
  • Number of updates: 4
  • Update frequency: every 8.8 days
  • Top authors: pushtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,528 total downloads

Benchmarks

Plugin footprint 83% from 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.10MB] [CPU: ▼6.20ms] Passed 4 tests

A check of server-side resources used by GIG Logistic Delivery for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.55 ▼5.06
Dashboard /wp-admin3.40 ▲0.0953.00 ▼0.18
Posts /wp-admin/edit.php3.51 ▲0.1548.65 ▼3.20
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.92 ▼15.33
Media Library /wp-admin/upload.php3.32 ▲0.0938.59 ▼1.19
GIGL Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=gigl_delivery3.1627.85
Dashboard /wp-admin/admin.php?page=gigl_plugin3.3033.95

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GIG Logistic Delivery for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.26 ▼1.365.21 ▲3.3142.85 ▲1.12
Dashboard /wp-admin2,237 ▲494.84 ▼0.95103.97 ▼15.8743.08 ▼2.97
Posts /wp-admin/edit.php2,120 ▲312.04 ▲0.0538.70 ▲1.7731.86 ▼3.98
Add New Post /wp-admin/post-new.php1,540 ▲2623.15 ▲5.60673.86 ▼27.3452.77 ▼22.50
Media Library /wp-admin/upload.php1,419 ▲344.24 ▲0.02111.59 ▲3.5746.75 ▼0.17
GIGL Settings /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=gigl_delivery280.440.084.03
Dashboard /wp-admin/admin.php?page=gigl_plugin8842.0525.5028.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gigl-delivery/gigl-delivery.php
    • > /wp-content/plugins/gigl-delivery/inc/BaseHandlerLocateFiles/WC_Gigl_Delivery_Orders.php
    • > /wp-content/plugins/gigl-delivery/templates/admin.php
    • > /wp-content/plugins/gigl-delivery/inc/BaseHandlerLocateFiles/WC_Gigl_Delivery_API.php
    • > /wp-content/plugins/gigl-delivery/inc/PagesHandlerLocateFiles/Deliver_Loader_Handler_Class.php
    • > /wp-content/plugins/gigl-delivery/inc/BaseHandlerLocateFiles/WC_Gigl_Delivery_Shipping_Method.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'IncGiGl\\BaseHandlerLocateFiles\\Base_Controller_Handler_Class' not found in wp-content/plugins/gigl-delivery/inc/PagesHandlerLocateFiles/Admin_GIGL_Handler_Class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'IncGiGl\\BaseHandlerLocateFiles\\Base_Controller_Handler_Class' not found in wp-content/plugins/gigl-delivery/inc/BaseHandlerLocateFiles/Enqueue_Class_Files_Handler.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'IncGiGl\\BaseHandlerLocateFiles\\Base_Controller_Handler_Class' not found in wp-content/plugins/gigl-delivery/inc/BaseHandlerLocateFiles/Settings_Links_Handler_Class.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=shipping§ion=gigl_delivery
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=shipping&section=gigl_delivery - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8 in gigl-delivery/assets to your readme.txt
You can look at the official readme.txt

gigl-delivery/gigl-delivery.php Passed 13 tests

The entry point to "GIG Logistic Delivery for Woocommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
20 characters long description:
A delivery platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,604 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP244065321,573
Bourne Shell111356877
JavaScript1514108
CSS11028
JSON20018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods84
▷ Static methods1011.90%
▷ Public methods8297.62%
▷ Protected methods00.00%
▷ Private methods22.38%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 1.40MB with 0.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo/gig-favicon.png1.58KB1.24KB▼ 21.21%
assets/screenshot-5.png41.24KB11.96KB▼ 71.01%
assets/screenshot-3.png213.87KB60.95KB▼ 71.50%
assets/media/gigl mobile.png447.02KB231.05KB▼ 48.31%
assets/screenshot-6.png66.79KB19.67KB▼ 70.55%