10% easy-table-booking

Code Review | Easy Restaurant Table Booking

WordPress plugin Easy Restaurant Table Booking scored10%from 54 tests.

About plugin

  • Plugin page: easy-table-booking
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 16, 2019
  • Latest release: Feb 22, 2021
  • Number of updates: 10
  • Update frequency: every 43.5 days
  • Top authors: way2neelam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,157 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
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/easy-table-booking/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbytbAdminfunction has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼58.03ms] Passed 4 tests

A check of server-side resources used by Easy Restaurant Table Booking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.324.96 ▼36.17
Dashboard /wp-admin2.21 ▼1.147.15 ▼47.38
Posts /wp-admin/edit.php2.21 ▼1.197.20 ▼46.13
Add New Post /wp-admin/post-new.php2.21 ▼3.726.76 ▼102.45
Media Library /wp-admin/upload.php2.21 ▼1.066.33 ▼33.89
Settings /wp-admin/admin.php?page=tbl-settings2.215.99
Bookings /wp-admin/admin.php?page=tbl-bookings2.217.10
Add Table /wp-admin/admin.php?page=tbl-addtable2.215.92
Table List /wp-admin/admin.php?page=tbl-list2.215.96

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: 2 new tables, 7 new options
New tables
wp_table_master
wp_booking_master
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
esytb_default
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Easy Restaurant Table Booking
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20013.53 ▼1.189.59 ▲8.0140.04 ▲0.68
Dashboard /wp-admin2,242 ▲655.67 ▲0.1488.14 ▼1.4639.92 ▼3.68
Posts /wp-admin/edit.php2,147 ▲472.21 ▲0.2234.63 ▼5.5138.33 ▲0.69
Add New Post /wp-admin/post-new.php1,566 ▲4023.05 ▲0.11587.51 ▼96.6361.55 ▲2.53
Media Library /wp-admin/upload.php1,450 ▲504.26 ▲0.14100.11 ▼16.7842.97 ▼6.58
Settings /wp-admin/admin.php?page=tbl-settings1,7812.1928.4830.93
Bookings /wp-admin/admin.php?page=tbl-bookings1,1922.2233.5430.58
Add Table /wp-admin/admin.php?page=tbl-addtable8952.2028.6928.08
Table List /wp-admin/admin.php?page=tbl-list8842.1925.5226.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/easy-table-booking/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbytbAdminfunction has a deprecated constructor
  • Zombie tables detected upon uninstall: 2 tables
    • wp_table_master
    • wp_booking_master
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tbl-list
    • > Deprecated in wp-content/plugins/easy-table-booking/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbytbAdminfunction has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=tbl-settings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+560
    Undefined index: booked_con
    • > GET request to /wp-admin/admin.php?page=tbl-settings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+589
    Undefined index: date_format
    • > GET request to /wp-admin/admin.php?page=tbl-bookings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+229
    Undefined index: filter
    • > GET request to /wp-admin/admin.php?page=tbl-bookings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+270
    Undefined index: datefrom
    • > GET request to /wp-admin/admin.php?page=tbl-bookings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+271
    Undefined index: dateto
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tbl-bookings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+285
    Undefined index: tm12
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tbl-bookings
    • > Notice in wp-content/plugins/easy-table-booking/includes/admin_menu.class.php+297
    Undefined index: status

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-table-booking/includes/template-function.php:126

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
You can take inspiration from this readme.txt

easy-table-booking/easytablebooking.php 85% from 13 tests

"Easy Restaurant Table Booking" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-table-booking.php" instead of "easytablebooking.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,938 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS457941,656
PHP4132351,230
JavaScript11052

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity39.67
▷ Minimum class complexity3.00
▷ Maximum class complexity78.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%