89% menu-ordering-reservations

Code Review | Restaurant Menu - Food Ordering System - Table Reservation

WordPress plugin Restaurant Menu - Food Ordering System - Table Reservation scored89%from 54 tests.

About plugin

  • Plugin page: menu-ordering-res...
  • Plugin version: 2.3.8
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2018
  • Latest release: Aug 16, 2023
  • Number of updates: 107
  • Update frequency: every 18.6 days
  • Top authors: gloriafood (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

10,000+ active /271,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.42ms] Passed 4 tests

An overview of server-side resources used by Restaurant Menu - Food Ordering System - Table Reservation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.98 ▲6.52
Dashboard /wp-admin3.42 ▲0.0845.22 ▼18.27
Posts /wp-admin/edit.php3.47 ▲0.1247.80 ▲1.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.01 ▼17.31
Media Library /wp-admin/upload.php3.28 ▲0.0636.81 ▲3.98
Overview /wp-admin/admin.php?page=glf-overview3.3033.93
Settings /wp-admin/admin.php?page=glf-settings3.3632.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 119 new files
Database: no new tables, 11 new options
New WordPress options
glf_mor_restaurant_data
glf_check_old_widgets_elementor
widget_glf-mor-commerce
glf_mor_installation_id
db_upgraded
can_compress_scripts
theysaidso_admin_options
glf_plugin_redirect
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restaurant Menu - Food Ordering System - Table Reservation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲22313.61 ▼0.767.00 ▲5.3538.10 ▼1.39
Dashboard /wp-admin2,246 ▲975.97 ▲0.31113.06 ▲10.5382.99 ▲39.67
Posts /wp-admin/edit.php2,155 ▲692.10 ▲0.0839.23 ▲4.4134.92 ▲0.80
Add New Post /wp-admin/post-new.php6,368 ▲4,82623.53 ▲5.45848.93 ▲226.2242.87 ▼17.06
Media Library /wp-admin/upload.php1,442 ▲514.27 ▲0.1099.47 ▲1.3575.34 ▲32.27
Overview /wp-admin/admin.php?page=glf-overview9542.2430.2130.57
Settings /wp-admin/admin.php?page=glf-settings9511.399.3425.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • glf_plugin_redirect
    • can_compress_scripts
    • widget_recent-comments
    • glf_check_old_widgets_elementor
    • widget_glf-mor-commerce
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
Attributes that require attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

menu-ordering-reservations/restaurant-system.php 85% from 13 tests

This is the main PHP file of "Restaurant Menu - Food Ordering System - Table Reservation" version 2.3.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 309 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("menu-ordering-reservations.php" instead of "restaurant-system.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
No dangerous file extensions were detected10,321 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP318056715,265
CSS620382,340
JavaScript12188251,290
Sass116901,112
SVG21320221
PO File1313885
JSON8008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.18
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods246
▷ Static methods9136.99%
▷ Public methods22591.46%
▷ Protected methods114.47%
▷ Private methods104.07%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants17
▷ Global constants741.18%
▷ Class constants1058.82%
▷ Public constants10100.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
22 PNG files occupy 1.10MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png121.92KB84.95KB▼ 30.32%
assets/images/partner-dashboard-restaurants-overview-browser-0c728ae305.png32.45KB32.52KB0.00%
assets/images/help/publishing/q3-1.png125.73KB35.67KB▼ 71.63%
assets/images/logo.png2.26KB0.83KB▼ 63.38%
assets/images/help/publishing/q2-2.png61.26KB18.60KB▼ 69.63%