68% dt-booking-manager

Code Review | Ultimate Booking Manager

WordPress plugin Ultimate Booking Manager scored68%from 54 tests.

About plugin

  • Plugin page: dt-booking-manager
  • Plugin version: 1.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.6
  • WordPress version: 6.3.1
  • First release: Jun 6, 2018
  • Latest release: Sep 17, 2021
  • Number of updates: 35
  • Update frequency: every 34.8 days
  • Top authors: designthemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /5,270 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼29.79ms] Passed 4 tests

Server-side resources used by Ultimate Booking Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9729.46 ▼13.54
Dashboard /wp-admin4.48 ▲1.1833.70 ▼17.25
Posts /wp-admin/edit.php4.48 ▲1.1329.61 ▼19.87
Add New Post /wp-admin/post-new.php4.48 ▼1.4029.15 ▼68.51
Media Library /wp-admin/upload.php4.48 ▲1.2630.76 ▼6.76
Payments /wp-admin/edit.php?post_type=dt_customers&page=dt_payments4.4937.81
Calendar /wp-admin/edit.php?post_type=dt_customers&page=dt_calender4.4931.28
Settings /wp-admin/edit.php?post_type=dt_service&page=dt-booking-settings4.4933.33
Add New /wp-admin/post-new.php?post_type=dt_person4.4827.97
Customers /wp-admin/edit.php?post_type=dt_customers4.4932.56
All Services /wp-admin/edit.php?post_type=dt_service4.4926.15
Add New /wp-admin/post-new.php?post_type=dt_service4.4832.20
All Persons /wp-admin/edit.php?post_type=dt_person4.4929.57

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 203 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
_cs_options
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Ultimate Booking Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,286 ▲54016.02 ▲1.4110.26 ▲8.5941.94 ▼0.21
Dashboard /wp-admin2,545 ▲3547.02 ▲2.15129.55 ▲23.5840.27 ▼5.10
Posts /wp-admin/edit.php2,463 ▲3773.71 ▲1.7253.02 ▲15.4633.09 ▲0.18
Add New Post /wp-admin/post-new.php1,707 ▲17418.50 ▼4.58625.51 ▼104.5133.84 ▼24.81
Media Library /wp-admin/upload.php1,593 ▲2054.81 ▲0.6292.28 ▼12.9345.01 ▼4.80
Payments /wp-admin/edit.php?post_type=dt_customers&page=dt_payments1,3943.4743.3526.53
Calendar /wp-admin/edit.php?post_type=dt_customers&page=dt_calender1,8734.4088.1254.59
Settings /wp-admin/edit.php?post_type=dt_service&page=dt-booking-settings10,0414.39108.64157.79
Add New /wp-admin/post-new.php?post_type=dt_person9,2898.68229.26109.07
Customers /wp-admin/edit.php?post_type=dt_customers1,4213.8951.3530.65
All Services /wp-admin/edit.php?post_type=dt_service1,4833.6349.4726.06
Add New /wp-admin/post-new.php?post_type=dt_service2,9828.03176.5859.18
All Persons /wp-admin/edit.php?post_type=dt_person1,4833.6651.6832.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/dt-booking-manager/post-types/dt-person-post-type.php+621
    Trying to access array offset on value of type null
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • _cs_options

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
These server-side errors were triggered
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=dt_person
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/dt-booking-manager/post-types/dt-person-post-type.php+650
    Trying to access array offset on value of type null

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
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DTBookingManager\\Widgets\\DTBookingManagerWidgetBase' not found in wp-content/plugins/dt-booking-manager/widgets/modules/class-widget-reserve-appointment.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-booking-manager/dt-booking-manager.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'DTBookingManager\\Widgets\\DTBookingManagerWidgetBase' not found in wp-content/plugins/dt-booking-manager/widgets/modules/class-widget-person-item.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'DTBaseBookingSC' not found in wp-content/plugins/dt-booking-manager/vc/shortcodes/reserve_appointment.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'DTBookingManager\\Widgets\\DTBookingManagerWidgetBase' not found in wp-content/plugins/dt-booking-manager/widgets/modules/class-widget-reservation-form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/dt-booking-manager/templates/taxonomy-department.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/dt-booking-manager/templates/archive-service.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/dt-booking-manager/widgets/class-common-widget-base.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'DTBaseBookingSC' not found in wp-content/plugins/dt-booking-manager/vc/shortcodes/service_item.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-booking-manager/functions/reservation-functions.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: reservation, online booking, scheduling, elementor, appointments...

dt-booking-manager/dt-booking-manager.php Passed 13 tests

"Ultimate Booking Manager" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
A simple wordpress plugin designed to implements reservation features.

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
Good job! No executable or dangerous file extensions detected50,351 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
JSON20017,050
PHP982,9321,75911,919
JavaScript141,4901,4327,509
SVG40125,551
CSS141,1811005,290
Sass634102,083
PO File7306334705
Markdown2240177
XML14064
Bourne Shell1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.22
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes65
▷ Abstract classes34.62%
▷ Concrete classes6295.38%
▷ Final classes00.00%
Methods273
▷ Static methods93.30%
▷ Public methods25894.51%
▷ Protected methods155.49%
▷ Private methods00.00%
Functions81
▷ Named functions81100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants2095.24%
▷ Class constants14.76%
▷ Public constants1100.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
21 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cs-framework-override/images/one-third-column.png1.86KB0.82KB▼ 56.17%
reservation/menu/calender/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cs-framework/assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
cs-framework-override/images/1-3-3-3-1.png2.22KB0.92KB▼ 58.51%
cs-framework-override/images/individual-option.png1.91KB0.50KB▼ 73.89%