78% reserving

Code Review | Reserving - Online Food Ordering & Reservation System

WordPress plugin Reserving - Online Food Ordering & Reservation System scored78%from 54 tests.

About plugin

  • Plugin page: reserving
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2022
  • Latest release: Nov 28, 2022
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: quomodosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /300 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: ▲2.41MB] [CPU: ▲13.83ms] Passed 4 tests

An overview of server-side resources used by Reserving - Online Food Ordering & Reservation System
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.80 ▲2.3449.62 ▲7.88
Dashboard /wp-admin5.97 ▲2.6780.43 ▲31.45
Posts /wp-admin/edit.php6.01 ▲2.6580.11 ▲23.87
Add New Post /wp-admin/post-new.php7.94 ▲2.0590.42 ▼7.90
Media Library /wp-admin/upload.php5.83 ▲2.6075.22 ▲38.83
Orders /wp-admin/admin.php?page=reserving-at-orders5.7857.32
Reserving Settings /wp-admin/admin.php?page=reserving-settings5.8464.67
Reserving /wp-admin/admin.php?page=reserving5.8058.74

Server storage [IO: ▲2.04MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 313 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
recovery_mode_email_last_sent
reserving_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reserving - Online Food Ordering & Reservation System
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,541 ▼24514.36 ▼0.390.60 ▼2.0118.32 ▼27.10
Dashboard /wp-admin2,282 ▲1085.99 ▲0.4390.91 ▼0.1551.86 ▲10.53
Posts /wp-admin/edit.php2,179 ▲762.25 ▲0.2843.31 ▲1.8061.19 ▲25.64
Add New Post /wp-admin/post-new.php45 ▼1,4810.42 ▼22.840.06 ▼720.628.68 ▼49.33
Media Library /wp-admin/upload.php1,485 ▲854.42 ▲0.2393.89 ▼32.2148.53 ▼2.05
Orders /wp-admin/admin.php?page=reserving-at-orders7782.0513.4627.98
Reserving Settings /wp-admin/admin.php?page=reserving-settings1,3743.4551.7352.62
Reserving /wp-admin/admin.php?page=reserving8522.1228.9235.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • reserving_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=reserving-at-orders
    • > Error in wp-content/plugins/reserving/app/backend/pages/Orders.php+67
    Uncaught Error: Call to undefined function Reserving\backend\pages\get_woocommerce_currency_symbol() in wp-content/plugins/reserving/app/backend/pages/Orders.php:67
    Stack trace:
    #0 wp-content/plugins/reserving/app/backend/pages/Orders.php(48): Reserving\backend\pages\Orders->enqueue_scripts()
    #1 wp-includes/class-wp-hook.php(310): Reserving\backend\pages\Orders->render_page()
    #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/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 129× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reserving/app/extensions/frontend/shortcodes/frontend_dashboard/views/branch_manager/order_table.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Reserving_Packages\\DI\\ServiceProvider\\ServiceProviderInterface' not found in wp-content/plugins/reserving/packages/DI/ServiceProvider/BootableServiceProviderInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Reserving_Packages\\Options\\Fields\\Base_Field' not found in wp-content/plugins/reserving/packages/Options/Fields/Textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/reserving/app/extensions/frontend/shortcodes/views/single_branch/delivery_info/in_rest_checker.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/reserving/app/configs/menus.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reserving/app/extensions/frontend/shortcodes/views/multi_branch/delivery_info/delivery_checker.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Reserving\\extensions\\frontend\\shortcodes\\Frontend_Dashboard' not found in wp-content/plugins/reserving/app/extensions/frontend/shortcodes/frontend_dashboard/BranchManager.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Reserving_Packages\\DI\\Argument\\LiteralArgumentInterface' not found in wp-content/plugins/reserving/packages/DI/Argument/LiteralArgument.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function reserving_setting_option() in wp-content/plugins/reserving/app/extensions/frontend/shortcodes/frontend_dashboard/views/branch_manager/order_details.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Reserving_Packages\\Options\\Fields\\Base_Field' not found in wp-content/plugins/reserving/packages/Options/Fields/Password.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in reserving/assets to your readme.txt
You can take inspiration from this readme.txt

reserving/reserving.php Passed 13 tests

The main file in "Reserving - Online Food Ordering & Reservation System" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
34 characters long description:
Online Food Ordering & Reservation

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin19,690 lines of code in 292 files:
LanguageFilesBlank linesComment linesLines of code
PHP1762,5601,90112,978
CSS21296762,977
JavaScript24355602,294
SVG67001,358
JSON40083

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.85
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces34
Interfaces17
Traits2
Classes100
▷ Abstract classes66.00%
▷ Concrete classes9494.00%
▷ Final classes66.38%
Methods489
▷ Static methods346.95%
▷ Public methods46595.09%
▷ Protected methods163.27%
▷ Private methods81.64%
Functions45
▷ Named functions4293.33%
▷ Anonymous functions36.67%
Constants23
▷ Global constants1356.52%
▷ Class constants1043.48%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/backend/imgs/icons/home-delivery.png0.95KB0.57KB▼ 39.79%
assets/backend/imgs/icons/location.png0.63KB0.44KB▼ 30.31%
assets/backend/imgs/icons/in-dine.png0.77KB0.50KB▼ 34.39%