10% lalamove

Code Review | Lalamove

WordPress plugin Lalamove scored10%from 54 tests.

About plugin

  • Plugin page: lalamove
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2022
  • Latest release: Nov 22, 2022
  • Number of updates: 9
  • Update frequency: every 35.7 days
  • Top authors: lalamove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /5,915 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/lalamove/includes/utility-functions.php+244
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/lalamove/includes/utility-functions.php:244
    Stack trace:
    #0 wp-content/plugins/lalamove/lalamove.php(134): lalamove_track()
    #1 wp-includes/class-wp-hook.php(310): WC_Integration_Lalamove::activation_hook()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.31ms] Passed 4 tests

This is a short check of server-side resources used by Lalamove
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.86 ▼4.28
Dashboard /wp-admin3.31 ▲0.0042.60 ▼4.22
Posts /wp-admin/edit.php3.36 ▲0.0044.08 ▼0.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.96 ▼10.12
Media Library /wp-admin/upload.php3.23 ▲0.0033.24 ▼2.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Lalamove
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.104.65 ▲2.9043.03 ▲2.57
Dashboard /wp-admin2,206 ▲215.90 ▲1.01110.47 ▲2.9040.62 ▼1.28
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0040.40 ▲5.4136.23 ▲1.21
Add New Post /wp-admin/post-new.php1,514 ▼517.39 ▼5.75596.42 ▼64.9954.53 ▼0.65
Media Library /wp-admin/upload.php1,388 ▼34.30 ▲0.0995.11 ▼2.6940.86 ▼2.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/lalamove/includes/utility-functions.php+244
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/lalamove/includes/utility-functions.php:244
    Stack trace:
    #0 wp-content/plugins/lalamove/lalamove.php(143): lalamove_track()
    #1 wp-includes/class-wp-hook.php(310): WC_Integration_Lalamove::uninstall_hook()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(1269): do_action()
    #5 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall correctly, leaving 13 files (0.04MB) in the plugin directory
    • (new file) pages/home.php
    • (new file) includes/class-lalamove-app.php
    • (new file) assets/images/lalamove-favicon.svg
    • (new file) includes/lalamove-shipping-method.php
    • (new file) pages/auth.php
    • (new file) includes/class-lalamove-widget-actions.php
    • (new file) lalamove.php
    • (new file) includes/utility-functions.php
    • (new file) pages/not-support-dc.php
    • (new file) assets/js/meta-box.js
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/lalamove/pages/not-support-dc.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/lalamove/pages/order-detail.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/lalamove/pages/auth.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/lalamove/pages/home.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/lalamove/pages/place-order.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: lalamove, same day delivery, shipping, delivery, courier...

lalamove/lalamove.php Passed 13 tests

This is the main PHP file of "Lalamove" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
29 characters long description:
A 24/7 on-demand delivery app

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin798 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP108631664
SVG100115
JavaScript10019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.25
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods423.53%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected