10% gs-scheduling

Code Review | Schedules and Appointments

WordPress plugin Schedules and Appointments scored 10% from 54 tests.

About plugin

  • Plugin page: gs-scheduling
  • Plugin version: 2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3.2
  • WordPress version: 5.9.2
  • First release: Feb 21, 2019
  • Latest release: Feb 13, 2020
  • Number of updates: 17
  • Update frequency: every 21.0 days
  • Top authors: hermannschwett (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 465 total downloads

Benchmarks

Plugin footprint 58% 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
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/gs-scheduling/gs-scheduling.php+24
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼2.53MB] [CPU: ▼343.25ms] Passed 4 tests

A check of server-side resources used by Schedules and Appointments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.674.61 ▼45.57
Dashboard /wp-admin1.86 ▼1.554.37 ▼28.83
Posts /wp-admin/edit.php1.86 ▼1.785.44 ▼30.24
Add New Post /wp-admin/post-new.php1.86 ▼5.114.18 ▼1,268.36
Media Library /wp-admin/upload.php1.86 ▼1.443.70 ▼20.63
Event-Bookings /wp-admin/admin.php?page=gs_scheduling_bookings_settings1.865.37
Ticket-Entries /wp-admin/admin.php?page=gs_scheduling_ticket_entries_settings1.864.21
Dates Closed /wp-admin/admin.php?page=gs_scheduling_date_closed_settings1.864.77
Ticket-Bookings /wp-admin/admin.php?page=gs_scheduling_ticket_bookings_settings1.864.04
Schedule-Entries /wp-admin/admin.php?page=gs_scheduling_schedule_entries_settings1.864.52
Schedule /wp-admin/admin.php?page=gs_scheduling_general_settings1.864.09
Contact Messages /wp-admin/admin.php?page=gs_scheduling_contact_message_settings1.864.75

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 54 new files
Database: 6 new tables, 1 new option
New tables
wp_gs_dates_closed
wp_gs_contact_messages
wp_gs_tickets
wp_gs_event_booking
wp_gs_ticket_bookings
wp_gs_schedule
New WordPress options
gs_scheduling_general_options

Browser metrics Passed 4 tests

Schedules and Appointments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,199 ▲45518.20 ▲2.5510.15 ▲4.452.34 ▲0.07
Dashboard /wp-admin3,178 ▲3178.41 ▲2.27144.68 ▲16.61169.63 ▲7.23
Posts /wp-admin/edit.php3,010 ▲3165.08 ▲1.8493.33 ▲31.33143.55 ▲2.15
Add New Post /wp-admin/post-new.php1,729 ▼2315.51 ▼6.01367.93 ▼96.48150.10 ▼7.13
Media Library /wp-admin/upload.php1,792 ▲915.93 ▲0.40107.53 ▼33.56182.61 ▼3.37
Event-Bookings /wp-admin/admin.php?page=gs_scheduling_bookings_settings1,5614.8569.21100.28
Ticket-Entries /wp-admin/admin.php?page=gs_scheduling_ticket_entries_settings1,5835.0869.70113.74
Dates Closed /wp-admin/admin.php?page=gs_scheduling_date_closed_settings1,5695.0870.05112.00
Ticket-Bookings /wp-admin/admin.php?page=gs_scheduling_ticket_bookings_settings1,6694.8770.3396.21
Schedule-Entries /wp-admin/admin.php?page=gs_scheduling_schedule_entries_settings1,7365.1471.91112.17
Schedule /wp-admin/admin.php?page=gs_scheduling_general_settings1,8904.8768.10123.97
Contact Messages /wp-admin/admin.php?page=gs_scheduling_contact_message_settings1,6314.8574.49110.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gs-scheduling/gs-scheduling.php+24
    date_default_timezone_set(): Timezone ID '' is invalid

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
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_contact_message_settings
    • > Notice in wp-content/plugins/gs-scheduling/gs-scheduling.php+24
    date_default_timezone_set(): Timezone ID '' is invalid
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_contact_message_settings
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_contact_message_settings
    • > Notice in wp-content/plugins/gs-scheduling/gs-scheduling-admin-main.php+250
    Undefined variable: schedule_warning_underbooked
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_ticket_bookings_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/bookings/gs-scheduling-ticket-bookings-list-table.php+186
    Undefined index: active-bookings
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_contact_message_settings
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (1) for the number of arguments passed (2). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+74
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_date_closed_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/dates-closed/gs-scheduling-admin-date-closed-settings.php+60
    Undefined index: action-date-closed
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_date_closed_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/dates-closed/gs-scheduling-date-closed-list-table.php+107
    Undefined variable: orderby_1
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_ticket_bookings_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/bookings/gs-scheduling-admin-ticket-bookings.php+18
    Undefined index: page
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+424
    Undefined index: warning_underbooked_email
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+433
    Undefined index: warning_underbooked_schedule
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+465
    Undefined index: postcode
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+473
    Undefined index: city
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+481
    Undefined index: address
    • > GET request to /wp-admin/admin.php?page=gs_scheduling_general_settings
    • > Notice in wp-content/plugins/gs-scheduling/admin/general-settings/gs-scheduling-admin-general-settings.php+489
    Undefined index: telefone

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
  • 48× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-scheduling/admin/contact/gs-scheduling-contact-messages-list.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/gs-scheduling/admin/dates-closed/gs-scheduling-date-closed-list-table.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-scheduling/admin/tickets/gs-scheduling-admin-ticket-list-table.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-scheduling/admin/bookings/gs-scheduling-bookings-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/gs-scheduling/schedules/book-event.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/gs-scheduling/admin/contact/gs-scheduling-contact-messages-list.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-scheduling/admin/bookings/gs-scheduling-ticket-bookings-list-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/gs-scheduling/admin/tickets/gs-scheduling-admin-ticket-list-table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/gs-scheduling/admin/schedule/gs-scheduling-admin-schedule-list-table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/gs-scheduling/admin/tickets/gs-scheduling-admin-ticket-list-table.php on line 3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: reservation, booking, schedule, appointments, reservation system

gs-scheduling/gs-scheduling.php Passed 13 tests

Analyzing the main PHP file in "Schedules and Appointments" version 2.0
113 characters long description:
A plugin to produce a schedule of events and an appointment-booking function to book one or more of these events.

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
Everything looks great! No dangerous files found in this plugin8,252 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,0867965,917
PO File15429311,245
JavaScript4764623
CSS37031365
HTML21411102

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods127
▷ Static methods00.00%
▷ Public methods10683.46%
▷ Protected methods2116.54%
▷ Private methods00.00%
Functions170
▷ Named functions16798.24%
▷ Anonymous functions31.76%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin