73% booking-system

Code Review | Pinpoint Booking System - #1 WordPress Booking Plugin

WordPress plugin Pinpoint Booking System - #1 WordPress Booking Plugin scored73%from 54 tests.

About plugin

  • Plugin page: booking-system
  • Plugin version: 2.9.9.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 2, 2013
  • Latest release: Nov 29, 2023
  • Number of updates: 351
  • Update frequency: every 10.7 days
  • Top authors: mariuscristian (60.11%)DOTonPAPER (39.89%)

Code review

54 tests

User reviews

179 reviews

Install metrics

5,000+ active /601,299 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲9.69MB] [CPU: ▲57.59ms] 50% from 4 tests

This is a short check of server-side resources used by Pinpoint Booking System - #1 WordPress Booking Plugin
Please have a look at the following items
  • RAM: The total memory usage must be kept under 10MB (currently 14.27MB on /wp-admin/admin.php?page=dopbsp-fees)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 9.69MB on /wp-admin/admin.php?page=dopbsp-fees)
PageMemory (MB)CPU Time (ms)
Home /12.19 ▲8.7394.67 ▲53.75
Dashboard /wp-admin13.73 ▲10.39111.46 ▲50.31
Posts /wp-admin/edit.php13.73 ▲10.37113.12 ▲65.09
Add New Post /wp-admin/post-new.php15.16 ▲9.27160.49 ▲65.92
Media Library /wp-admin/upload.php13.73 ▲10.5096.14 ▲61.20
Discounts /wp-admin/admin.php?page=dopbsp-discounts14.26116.08
Locations /wp-admin/admin.php?page=dopbsp-locations14.26108.08
Email templates /wp-admin/admin.php?page=dopbsp-emails14.26108.13
Translation /wp-admin/admin.php?page=dopbsp-translation14.26111.18
Extras /wp-admin/admin.php?page=dopbsp-extras14.26119.11
Search only in PRO /wp-admin/admin.php?page=dopbsp-pro14.2699.44
Rules /wp-admin/admin.php?page=dopbsp-rules14.26116.89
Reservations /wp-admin/admin.php?page=dopbsp-reservations14.26118.03
SMS templates /wp-admin/admin.php?page=dopbsp-smses14.27108.08
Taxes & fees /wp-admin/admin.php?page=dopbsp-fees14.27110.22

Server storage [IO: ▲9.24MB] [DB: ▲0.31MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 894 new files
Database: 33 new tables, 42 new options
New tables
wp_dopbsp_availability
wp_dopbsp_forms_fields
wp_dopbsp_settings_calendar
wp_dopbsp_reservations
wp_dopbsp_extras_groups
wp_dopbsp_days
wp_dopbsp_forms
wp_dopbsp_fees
wp_dopbsp_discounts_items_rules
wp_dopbsp_settings_search
...
New WordPress options
DOPBSP_db_version_extras_groups_items
DOPBSP_db_version_availability_price
DOPBSP_db_version_emails
DOPBSP_db_version_extras
DOPBSP_db_version_calendars
widget_recent-comments
DOPBSP_db_version_smses
DOPBSP_db_version_searches
DOPBSP_db_version_smses_translation
DOPBSP_request_rating
...

Browser metrics 75% from 4 tests

An overview of browser requirements for Pinpoint Booking System - #1 WordPress Booking Plugin
Having an awesome user experience is important, so please improve the following
  • Nodes: Limit the number of DOM nodes under 25,000 (currently 37,769 on /wp-admin/admin.php?page=dopbsp-translation)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲28113.49 ▼1.2713.47 ▲11.7737.73 ▼7.69
Dashboard /wp-admin2,287 ▲1095.64 ▼0.0794.68 ▼21.8543.24 ▼1.50
Posts /wp-admin/edit.php2,192 ▲921.99 ▼0.0339.64 ▲1.9534.15 ▼2.69
Add New Post /wp-admin/post-new.php1,600 ▲7421.14 ▼1.87648.92 ▼33.3347.24 ▼11.22
Media Library /wp-admin/upload.php1,489 ▲924.24 ▲0.0494.30 ▼4.8943.66 ▼0.30
Discounts /wp-admin/admin.php?page=dopbsp-discounts1,3523.60105.0579.69
Locations /wp-admin/admin.php?page=dopbsp-locations1,3844.04115.6443.67
Email templates /wp-admin/admin.php?page=dopbsp-emails1,3623.4860.6444.12
Translation /wp-admin/admin.php?page=dopbsp-translation37,7692.84105.50273.41
Extras /wp-admin/admin.php?page=dopbsp-extras1,3623.7357.6341.42
Search only in PRO /wp-admin/admin.php?page=dopbsp-pro2,1803.8755.4180.10
Rules /wp-admin/admin.php?page=dopbsp-rules1,3433.3962.7246.84
Reservations /wp-admin/admin.php?page=dopbsp-reservations2,5723.8279.9254.35
SMS templates /wp-admin/admin.php?page=dopbsp-smses1,3563.4063.8943.39
Taxes & fees /wp-admin/admin.php?page=dopbsp-fees1,3443.6063.9047.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 33 tables
    • wp_dopbsp_settings_calendar
    • wp_dopbsp_emails
    • wp_dopbsp_searches
    • wp_dopbsp_availability
    • wp_dopbsp_availability_no
    • wp_dopbsp_coupons
    • wp_dopbsp_api_keys
    • wp_dopbsp_settings_search
    • wp_dopbsp_models
    • wp_dopbsp_fees
    • ...
  • This plugin does not fully uninstall, leaving 42 options in the database
    • DOPBSP_db_version_emails_translation
    • DOPBSP_db_version
    • DOPBSP_db_version_smses_translation
    • DOPBSP_db_version_rules
    • DOPBSP_request_rating
    • DOPBSP_db_version_calendars
    • DOPBSP_db_version_forms_fields
    • DOPBSP_db_version_settings_search
    • DOPBSP_db_version_fees
    • DOPBSP_db_version_availability_no
    • ...

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 371× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DOPBSPBackEndLanguages' not found in wp-content/plugins/booking-system/includes/languages/class-backend-language.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/google/apiclient-services/src/Google/Service/Calendar/EventAttachment.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/booking-system/application/libraries/google/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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: availability calendar, appointments, reservations, booking system, booking calendar

booking-system/dopbs.php 85% from 13 tests

The entry point to "Pinpoint Booking System - #1 WordPress Booking Plugin" version 2.9.9.4.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("booking-system.php" instead of "dopbs.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 390 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin135,575 lines of code in 831 files:
LanguageFilesBlank linesComment linesLines of code
PHP66315,73858,74295,323
JavaScript883,9848,58722,538
CSS271,9951,82811,585
Markdown311,44004,447
JSON16001,544
SVG10065
YAML26043
XML10011
Dockerfile18010
make1409

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.17
▷ Minimum class complexity1.00
▷ Maximum class complexity632.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces39
Interfaces33
Traits9
Classes566
▷ Abstract classes101.77%
▷ Concrete classes55698.23%
▷ Final classes173.06%
Methods4,212
▷ Static methods2365.60%
▷ Public methods3,71788.25%
▷ Protected methods2104.99%
▷ Private methods2856.77%
Functions233
▷ Named functions11047.21%
▷ Anonymous functions12352.79%
Constants520
▷ Global constants13425.77%
▷ Class constants38674.23%
▷ Public constants36694.82%

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
32 PNG files occupy 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/gui/images/marker.png2.32KB1.35KB▼ 42.02%
templates/default/images/sprite.png7.09KB3.13KB▼ 55.83%
assets/gui/images/line-green-middle-retina.png1.91KB0.41KB▼ 78.62%
assets/gui/images/line-blue-top.png3.24KB0.42KB▼ 87.14%
assets/gui/images/line-green-middle.png3.01KB0.20KB▼ 93.42%