10% reservation-system-for-restaurants

Code Review | Reservation System For Restaurants

WordPress plugin Reservation System For Restaurants scored10%from 54 tests.

About plugin

  • Plugin page: reservation-syste...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 10
  • Update frequency: every 0.9 days
  • Top authors: bookiopro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,587 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/reservation-system-for-restaurants/bookiopro-widget.php+48
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼48.07ms] Passed 4 tests

An overview of server-side resources used by Reservation System For Restaurants
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.413.99 ▼31.64
Dashboard /wp-admin2.07 ▼1.235.80 ▼41.24
Posts /wp-admin/edit.php2.08 ▼1.295.58 ▼39.48
Add New Post /wp-admin/post-new.php2.08 ▼3.826.79 ▼79.90
Media Library /wp-admin/upload.php2.08 ▼1.166.00 ▼27.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_bp_widget
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reservation System For Restaurants
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲313.22 ▼1.224.31 ▲2.4939.93 ▲1.22
Dashboard /wp-admin2,192 ▲155.51 ▼0.0290.16 ▼0.1637.63 ▼1.24
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0639.92 ▲5.4135.49 ▼3.34
Add New Post /wp-admin/post-new.php1,526 ▼023.48 ▲0.30666.47 ▲33.3657.24 ▼0.19
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0393.38 ▼8.0541.11 ▼1.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/reservation-system-for-restaurants/bookiopro-widget.php+48
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_bp_widget
    • can_compress_scripts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/reservation-system-for-restaurants/inc/widget-frontend.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/reservation-system-for-restaurants/inc/widget-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/reservation-system-for-restaurants/bookiopro-widget.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/reservation-system-for-restaurants/classes/widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Page' not found in wp-content/plugins/reservation-system-for-restaurants/inc/display-widgets.php:703
    • > PHP Notice
      Undefined variable: widgetUrl in wp-content/plugins/reservation-system-for-restaurants/inc/widget-frontend.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: reservation system, reservation book, booking system, widget, restaurant...

reservation-system-for-restaurants/bookiopro-widget.php 85% from 13 tests

The principal PHP file in "Reservation System For Restaurants" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("reservation-system-for-restaurants.php" instead of "bookiopro-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 270 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected679 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP515494679

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity60.33
▷ Minimum class complexity3.00
▷ Maximum class complexity172.00
Average method complexity8.42
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo-bookiopro-com.png28.64KB8.53KB▼ 70.22%