10% wc-delivery-lpost

Code Review | Delivery L-Post for WooCommerce

WordPress plugin Delivery L-Post for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: wc-delivery-lpost
  • Plugin version: 1.52
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Feb 2, 2023
  • Number of updates: 20
  • Update frequency: every 24.8 days
  • Top authors: labirintpost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /949 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/wc-delivery-lpost/class-lpost_wc.php+1834
    syntax error, unexpected 'endif' (T_ENDIF)

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.91ms] Passed 4 tests

Analyzing server-side resources used by Delivery L-Post for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.68 ▲10.60
Dashboard /wp-admin3.31 ▼0.0451.92 ▼11.43
Posts /wp-admin/edit.php3.36 ▲0.0047.84 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.34 ▼25.00
Media Library /wp-admin/upload.php3.23 ▲0.0036.55 ▲3.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Delivery L-Post for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.33 ▼1.055.70 ▲4.0342.00 ▼0.23
Dashboard /wp-admin2,203 ▲155.84 ▼0.0497.24 ▼13.1738.87 ▼3.67
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0435.20 ▼7.4732.91 ▼3.69
Add New Post /wp-admin/post-new.php1,514 ▼017.91 ▲0.33691.26 ▲65.8954.99 ▼7.27
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0893.81 ▼9.3445.52 ▼1.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected 'endif' (T_ENDIF) in wp-content/plugins/wc-delivery-lpost/class-lpost_wc.php on line 1834
    • > PHP Fatal error
      Uncaught Error: Class 'LPost_WC' not found in wp-content/plugins/wc-delivery-lpost/lpost-wc-helper.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Screenshots: Please add descriptions for these screenshots #0, #0, #0 in wc-delivery-lpost/assets to your readme.txt
You can look at the official readme.txt

wc-delivery-lpost/lpost-wc-delivery.php 77% from 13 tests

The primary PHP file in "Delivery L-Post for WooCommerce" version 1.52 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-delivery-lpost.php" instead of "lpost-wc-delivery.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,751 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP55523172,801
JavaScript312546589
CSS32616323
SVG20038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity165.67
▷ Minimum class complexity83.00
▷ Maximum class complexity286.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods7795.06%
▷ Protected methods00.00%
▷ Private methods44.94%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/colorbox/images/border1.png0.61KB0.82KB0.00%
assets/js/colorbox/images/border2.png0.11KB0.16KB0.00%
assets/images/L-Post-logo-yandex-map-pin.png41.13KB15.94KB▼ 61.26%