62% timeslot

Code Review | Booking System for Your WordPress Appointments - Time Slot

WordPress plugin Booking System for Your WordPress Appointments - Time Slot scored62%from 54 tests.

About plugin

  • Plugin page: timeslot
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2022
  • Latest release: Oct 30, 2023
  • Number of updates: 136
  • Update frequency: every 3.1 days
  • Top authors: timeslotplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,101 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲1.51ms] Passed 4 tests

Server-side resources used by Booking System for Your WordPress Appointments - Time Slot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.51 ▲2.30
Dashboard /wp-admin3.49 ▲0.1846.96 ▼3.17
Posts /wp-admin/edit.php3.59 ▲0.2450.22 ▲4.60
Add New Post /wp-admin/post-new.php6.34 ▲0.4698.41 ▲2.31
Media Library /wp-admin/upload.php3.41 ▲0.1840.84 ▲4.64
Overview /wp-admin/admin.php?page=timeslot3.4536.22
Appointments /wp-admin/admin.php?page=timeslot-appointments3.3934.55
General Settings /wp-admin/admin.php?page=timeslot-general3.3834.11
Business Settings /wp-admin/admin.php?page=timeslot-business3.3733.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 203 new files
Database: 7 new tables, 11 new options
New tables
wp_ts_staff
wp_ts_services
wp_ts_payments
wp_ts_coupons
wp_ts_appointments
wp_ts_staff_services
wp_ts_customers
New WordPress options
plugin_error
timeslot-payment-methods-tab
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
timeslot_db_version
widget_theysaidso_widget
recovery_mode_email_last_sent
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Booking System for Your WordPress Appointments - Time Slot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9414.35 ▼0.001.64 ▼0.0442.98 ▼5.17
Dashboard /wp-admin2,261 ▲875.63 ▲0.1093.67 ▲10.1240.58 ▲0.52
Posts /wp-admin/edit.php2,167 ▲641.99 ▼0.0443.10 ▲3.4935.58 ▼0.98
Add New Post /wp-admin/post-new.php1,731 ▲20522.12 ▼1.44675.53 ▲11.6937.40 ▼15.23
Media Library /wp-admin/upload.php1,463 ▲664.28 ▲0.07104.29 ▲2.2543.66 ▼2.09
Overview /wp-admin/admin.php?page=timeslot1,2962.1334.2384.95
Appointments /wp-admin/admin.php?page=timeslot-appointments2,4044.32154.5991.25
General Settings /wp-admin/admin.php?page=timeslot-general1,1982.2128.3757.54
Business Settings /wp-admin/admin.php?page=timeslot-business8501.9728.2150.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 7 tables
    • wp_ts_services
    • wp_ts_customers
    • wp_ts_appointments
    • wp_ts_payments
    • wp_ts_staff_services
    • wp_ts_staff
    • wp_ts_coupons
  • This plugin does not fully uninstall, leaving 11 options in the database
    • recovery_mode_email_last_sent
    • db_upgraded
    • timeslot-email-tab
    • widget_recent-posts
    • widget_recent-comments
    • timeslot-payment-methods-tab
    • timeslot_db_version
    • can_compress_scripts
    • plugin_error
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=timeslot-business
    • > Error in wp-content/plugins/timeslot/admin/pages/tables/services.php+95
    Uncaught Error: Class 'NumberFormatter' not found in wp-content/plugins/timeslot/admin/pages/tables/services.php:95
    Stack trace:
    #0 wp-content/plugins/timeslot/inc/src/AdminPages.php(124): tslot_services_tab_init()
    #1 wp-content/plugins/timeslot/inc/src/AdminPages.php(37): TimeSlot\AdminPages->tslot_create_html()
    #2 wp-content/plugins/timeslot/admin/init/menu-pages.php(160): TimeSlot\AdminPages->__construct()
    #3 wp-includes/class-wp-hook.php(310): tslot_business_html()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/timeslot/public/css/ts-form-dynamic.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeslot/admin/init/scripts.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyParser' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Parser/AggregateMoneyParser.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyParser' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Parser/IntlMoneyParser.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyParser' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Parser/IntlLocalizedDecimalParser.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'TimeSlot\\TableData' not found in wp-content/plugins/timeslot/inc/src/CustomerData.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'TimeSlot\\TableData' not found in wp-content/plugins/timeslot/inc/src/StaffData.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyFormatter' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Formatter/IntlLocalizedDecimalFormatter.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\Currencies' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Currencies/ISOCurrencies.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\MoneyParser' not found in wp-content/plugins/timeslot/inc/vendor/moneyphp/money/src/Parser/BitcoinMoneyParser.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=timeslot-business
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).durationPicker is not a function" "TypeError: jQuery(...).durationPicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/timeslot/admin/js/tables/services.min.js?ver=6.3.1:1:6822)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=timeslot-business
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).durationPicker is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: appointments, booking calendar, booking system, appointment booking, booking

timeslot/timeslot.php 92% from 13 tests

The main file in "Booking System for Your WordPress Appointments - Time Slot" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.6" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin17,129 lines of code in 193 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122,4392,87310,629
JavaScript546284523,437
CSS155142152,517
Markdown21870290
JSON400219
XML10032
SVG5005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.91
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces11
Interfaces6
Traits1
Classes60
▷ Abstract classes11.67%
▷ Concrete classes5998.33%
▷ Final classes3355.93%
Methods319
▷ Static methods4313.48%
▷ Public methods29291.54%
▷ Protected methods30.94%
▷ Private methods247.52%
Functions132
▷ Named functions11990.15%
▷ Anonymous functions139.85%
Constants16
▷ Global constants531.25%
▷ Class constants1168.75%
▷ Public constants11100.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 were not PNG files found in your plugin