74% time-slot-booker

Code Review | TimeSlotBooker

WordPress plugin TimeSlotBooker scored 74% from 54 tests.

About plugin

  • Plugin page: time-slot-booker
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8
  • WordPress version: 5.8.1
  • First release: Sep 27, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: hitcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 609 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.11MB] [CPU: ▼180.07ms] Passed 4 tests

Server-side resources used by TimeSlotBooker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.6617.35 ▼13.39
Dashboard /wp-admin3.55 ▲0.4817.07 ▼26.94
Posts /wp-admin/edit.php3.55 ▲0.4415.20 ▼19.55
Add New Post /wp-admin/post-new.php3.55 ▼1.8916.18 ▼660.41
Media Library /wp-admin/upload.php3.55 ▲0.5415.91 ▼9.91
Schedule /wp-admin/admin.php?page=time-slot-booker&hca=schedule3.5518.67
Configuration /wp-admin/admin.php?page=time-slot-booker&hca=conf3.5628.30
Settings /wp-admin/admin.php?page=time-slot-booker&hca=settings3.5615.61

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 248 new files
Database: 7 new tables, no new options
New tables
wp_timeslotbooker_v1_migrations
wp_timeslotbooker_v1_orders
wp_timeslotbooker_v1_calendars
wp_timeslotbooker_v1_conf
wp_timeslotbooker_v1_relations
wp_timeslotbooker_v1_bookings
wp_timeslotbooker_v1_availability

Browser metrics Passed 4 tests

TimeSlotBooker: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲11616.00 ▼0.078.19 ▲1.7879.07 ▲4.47
Dashboard /wp-admin2,971 ▲756.10 ▼0.07115.55 ▼15.58171.92 ▲1.40
Posts /wp-admin/edit.php2,781 ▲413.24 ▲0.0168.69 ▲3.00160.59 ▲13.64
Add New Post /wp-admin/post-new.php3,839 ▲10418.97 ▲0.61447.99 ▲3.14161.26 ▼2.10
Media Library /wp-admin/upload.php1,793 ▲385.52 ▲0.01141.52 ▼4.52185.51 ▼0.18
Schedule /wp-admin/admin.php?page=time-slot-booker&hca=schedule1,6522.9174.48170.16
Configuration /wp-admin/admin.php?page=time-slot-booker&hca=conf1,2212.4158.05143.82
Settings /wp-admin/admin.php?page=time-slot-booker&hca=settings1,4872.4356.36151.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/time-slot-booker/happ2/hsystem/parts/profiler.php+75
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_timeslotbooker_v1_availability
    • wp_timeslotbooker_v1_migrations
    • wp_timeslotbooker_v1_relations
    • wp_timeslotbooker_v1_conf
    • wp_timeslotbooker_v1_calendars
    • wp_timeslotbooker_v1_bookings
    • wp_timeslotbooker_v1_orders

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=time-slot-booker&hca=settings
    • > Deprecated in wp-content/plugins/time-slot-booker/happ2/hsystem/parts/profiler.php+428
    Array and string offset access syntax with curly braces is deprecated

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: appointment scheduling, customer calendar, calendar booking, service scheduling, client scheduling...

time-slot-booker/time-slot-booker.php Passed 13 tests

The main PHP script in "TimeSlotBooker" version 1.0.2 is automatically included on every request by WordPress
24 characters long description:
Time slot booking plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin27,066 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP2274,0193,83120,588
JavaScript157742515,081
CSS396411,376
Markdown15021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.70
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes216
▷ Abstract classes20.93%
▷ Concrete classes21499.07%
▷ Final classes00.00%
Methods973
▷ Static methods474.83%
▷ Public methods86889.21%
▷ Protected methods939.56%
▷ Private methods121.23%
Functions73
▷ Named functions2331.51%
▷ Anonymous functions5068.49%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
There are no PNG files in this plugin