83% online-booking

Code Review | Appointment Scheduling and Online Booking by CozyCal

WordPress plugin Appointment Scheduling and Online Booking by CozyCal scored 83% from 54 tests.

About plugin

  • Plugin page: online-booking
  • Plugin version: 2.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Nov 4, 2022
  • Number of updates: 69
  • Update frequency: every 37.1 days
  • Top authors: csytan (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

100+ active / 24,358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.95ms] Passed 4 tests

A check of server-side resources used by Appointment Scheduling and Online Booking by CozyCal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.58 ▼4.75
Dashboard /wp-admin3.34 ▲0.0445.42 ▼7.08
Posts /wp-admin/edit.php3.39 ▲0.0343.19 ▼2.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.04 ▼1.94
Media Library /wp-admin/upload.php3.26 ▲0.0334.32 ▲0.40
CozyCal /wp-admin/options-general.php?page=online-booking3.2332.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Appointment Scheduling and Online Booking by CozyCal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲16313.31 ▼1.111.97 ▲0.3040.66 ▼7.91
Dashboard /wp-admin2,250 ▲625.79 ▼0.01110.08 ▲3.1542.48 ▼4.54
Posts /wp-admin/edit.php2,139 ▲502.01 ▼0.0436.30 ▲0.4531.36 ▼3.98
Add New Post /wp-admin/post-new.php1,555 ▲817.62 ▼0.73681.80 ▲75.9551.61 ▲2.02
Media Library /wp-admin/upload.php1,438 ▲474.29 ▲0.09116.80 ▲15.8349.46 ▲2.72
CozyCal /wp-admin/options-general.php?page=online-booking8322.0325.2549.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/online-booking/cozycal.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (CozyCal's "Schedule Appointment" widget), #2 (Team booking page), #3 (Choosing a date), #4 (Guest intake form), #5 (Guest event confirmation), #6 (Internal calendar), #7 (Contacts and previous clients)
Please take inspiration from this readme.txt

online-booking/cozycal.php 92% from 13 tests

The main PHP script in "Appointment Scheduling and Online Booking by CozyCal" version 2.9.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("online-booking.php" instead of "cozycal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin169 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14423169

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 4.30MB with 3.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png802.81KB81.10KB▼ 89.90%
screenshot-3.png777.35KB67.72KB▼ 91.29%
screenshot-7.png235.75KB60.73KB▼ 74.24%
screenshot-6.png644.68KB202.93KB▼ 68.52%
screenshot-5.png1,077.00KB99.60KB▼ 90.75%