68% wp-time-slots-booking-form

Code Review | WP Time Slots Booking Form

WordPress plugin WP Time Slots Booking Form scored68%from 54 tests.

About plugin

  • Plugin page: wp-time-slots-boo...
  • Plugin version: 1.2.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 204
  • Update frequency: every 8.9 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

1,000+ active /80,297 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.68MB] [CPU: ▲0.48ms] Passed 4 tests

Analyzing server-side resources used by WP Time Slots Booking Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6939.13 ▼6.60
Dashboard /wp-admin4.02 ▲0.7248.61 ▲0.63
Posts /wp-admin/edit.php4.07 ▲0.7252.54 ▲3.67
Add New Post /wp-admin/post-new.php6.55 ▲0.6694.38 ▲10.22
Media Library /wp-admin/upload.php3.88 ▲0.6538.65 ▲4.23
Online Demo /wp-admin/admin.php?page=cp_timeslotsbooking_odemo3.8333.46
General Settings /wp-admin/admin.php?page=cp_timeslotsbooking_settings3.9236.51
WP Time Slots Booking Form /wp-admin/admin.php?page=cp_timeslotsbooking4.0839.38
I Need Help /wp-admin/admin.php?page=cp_timeslotsbooking_support3.8334.28
Add Ons /wp-admin/admin.php?page=cp_timeslotsbooking_addons3.9940.10
Upgrade Plugin /wp-admin/admin.php?page=cp_timeslotsbooking_upgrade3.8332.57
WP Time Slots Booking Form /wp-admin/options-general.php?page=cp_timeslotsbooking4.0838.75

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 370 new files
Database: 2 new tables, 9 new options
New tables
wp_cptslotsbk_forms
wp_cptslotsbk_messages
New WordPress options
widget_cp_timeslotsbookingplugin_widget
widget_theysaidso_widget
theysaidso_admin_options
cp_cptslotsb_last_verified
widget_recent-posts
installed_wp-time-slots-booking-form
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP Time Slots Booking Form: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7514.27 ▼0.441.77 ▲0.1237.58 ▼6.12
Dashboard /wp-admin2,245 ▲655.62 ▼0.0289.61 ▼2.3040.05 ▼3.42
Posts /wp-admin/edit.php2,147 ▲471.95 ▼0.0239.49 ▲4.1936.55 ▲3.32
Add New Post /wp-admin/post-new.php6,247 ▲4,72119.08 ▼4.08883.35 ▲279.4238.57 ▼12.67
Media Library /wp-admin/upload.php1,447 ▲474.23 ▲0.05100.48 ▲3.0842.93 ▲0.93
Online Demo /wp-admin/admin.php?page=cp_timeslotsbooking_odemo2,3993.4792.00147.72
General Settings /wp-admin/admin.php?page=cp_timeslotsbooking_settings1,3523.2044.6028.82
WP Time Slots Booking Form /wp-admin/admin.php?page=cp_timeslotsbooking9352.3342.4627.03
I Need Help /wp-admin/admin.php?page=cp_timeslotsbooking_support1,6064.0169.2755.07
Add Ons /wp-admin/admin.php?page=cp_timeslotsbooking_addons1,3302.1523.5347.86
Upgrade Plugin /wp-admin/admin.php?page=cp_timeslotsbooking_upgrade3,3383.8350.4262.40
WP Time Slots Booking Form /wp-admin/options-general.php?page=cp_timeslotsbooking9162.4648.5430.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_cptslotsbk_forms
    • wp_cptslotsbk_messages
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • installed_wp-time-slots-booking-form
    • theysaidso_admin_options
    • cp_cptslotsb_last_verified
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_cp_timeslotsbookingplugin_widget

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-time-slots-booking-form/cp-public-int.inc.php
    • > /wp-content/plugins/wp-time-slots-booking-form/js/fbuilder-loader-admin.php
    • > /wp-content/plugins/wp-time-slots-booking-form/js/fbuilder-loader-public.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-time-slots-booking-form/addons/dashboard-box.addon.php:35
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-time-slots-booking-form/cp-admin-int-message-list.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wp-time-slots-booking-form/controllers/elementor/elementorwidget_class.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-time-slots-booking-form/cp-admin-int-list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CP_TSLOTSBOOK_BaseClass' not found in wp-content/plugins/wp-time-slots-booking-form/cp-main-class.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-time-slots-booking-form/addons/icalexport.addon.php:165
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-time-slots-booking-form/controllers/elementor/cp-elementor-widget.inc.php:11
    • > PHP Notice
      Undefined index: cal in wp-content/plugins/wp-time-slots-booking-form/cp-admin-int-message-list.inc.php on line 4

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-time-slots-booking-form/wp-time-slots-booking-plugin.php 92% from 13 tests

This is the main PHP file of "WP Time Slots Booking Form" version 1.2.01, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-time-slots-booking-form.php" instead of "wp-time-slots-booking-plugin.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
Good job! No executable or dangerous file extensions detected50,616 lines of code in 250 files:
LanguageFilesBlank linesComment linesLines of code
PO File6112,69312,89027,453
JavaScript1381,0861,14915,124
PHP261,0803196,195
CSS171411771,804
INI80040

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity71.62
▷ Minimum class complexity2.00
▷ Maximum class complexity447.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods101
▷ Static methods00.00%
▷ Public methods8988.12%
▷ Protected methods43.96%
▷ Private methods87.92%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants46
▷ Global constants46100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 0.31MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.12KB0.15KB0.00%
css/cupertino/images/ui-bg_glass_80_eebd4d_1x400.png0.40KB0.17KB▼ 58.09%
css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.14KB0.17KB0.00%
css/cupertino/images/ui-icons_72a7cf_256x240.png4.27KB4.11KB▼ 3.78%
css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png0.18KB0.08KB▼ 51.93%