10% booking-calendar-contact-form

Code Review | Booking Calendar Contact Form

WordPress plugin Booking Calendar Contact Form scored10%from 54 tests.

About plugin

  • Plugin page: booking-calendar-...
  • Plugin version: 1.2.48
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.4
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Nov 6, 2023
  • Number of updates: 570
  • Update frequency: every 6.9 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

800+ active /199,335 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/booking-calendar-contact-form/dex_bccf.php+74
    Undefined variable: wpdb

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

Server-side resources used by Booking Calendar Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4943.11 ▲3.14
Dashboard /wp-admin3.79 ▲0.4557.08 ▼7.92
Posts /wp-admin/edit.php3.91 ▲0.5548.96 ▲2.75
Add New Post /wp-admin/post-new.php6.38 ▲0.5098.40 ▲2.85
Media Library /wp-admin/upload.php3.72 ▲0.4933.90 ▲0.63

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 225 new files
Database: 5 new tables, 9 new options
New tables
wp_bccf_reservation_calendars_data
wp_bccf_dex_season_prices
wp_bccf_dex_discount_codes
wp_bccf_reservation_calendars
wp_bccf_dex_bccf_submissions
New WordPress options
installed_booking-calendar-contact-form
BCCF_RCODE
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
autoptimize_js_exclude
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Booking Calendar Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7814.14 ▼0.141.74 ▲0.0439.64 ▼3.55
Dashboard /wp-admin2,233 ▲565.58 ▼0.0795.23 ▼4.5545.29 ▲1.36
Posts /wp-admin/edit.php2,135 ▲382.11 ▲0.1733.43 ▼4.4435.21 ▼0.25
Add New Post /wp-admin/post-new.php6,250 ▲4,72419.21 ▼4.031,168.34 ▲446.7239.41 ▼24.42
Media Library /wp-admin/upload.php1,435 ▲324.18 ▲0.0195.89 ▼9.7143.72 ▼1.78
Help: Online demo /wp-admin/dex_bccf.php?page=dex_bccf_demo260.410.0613.81
Upgrade /wp-admin/dex_bccf.php?page=dex_bccf_upgrade260.410.106.68
Manage Calendar /wp-admin/dex_bccf.php260.410.086.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 5 tables
    • wp_bccf_dex_discount_codes
    • wp_bccf_reservation_calendars
    • wp_bccf_dex_season_prices
    • wp_bccf_reservation_calendars_data
    • wp_bccf_dex_bccf_submissions
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • BCCF_RCODE
    • widget_recent-comments
    • autoptimize_js_exclude
    • theysaidso_admin_options
    • installed_booking-calendar-contact-form

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/booking-calendar-contact-form/addons/dex_allcals.inc.php
    • > /wp-content/plugins/booking-calendar-contact-form/captcha/captcha.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-calendar-contact-form/banner.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/booking-calendar-contact-form/dex_scheduler.inc.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/booking-calendar-contact-form/cp_admin_int_add_booking.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/booking-calendar-contact-form/dex_bccf.php:18
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/booking-calendar-contact-form/dex_scheduler_block.inc.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/booking-calendar-contact-form/dex_bccf_admin_int.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/booking-calendar-contact-form/dex_bccf_admin_int_calendar_list.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-calendar-contact-form/cp-feedback.php:2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/booking-calendar-contact-form/dex_scheduler_block.inc.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/booking-calendar-contact-form/dex_bccf_admin_int_bookings_list.inc.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/dex_bccf.php?page=dex_bccf_demo
    • > Network (severe)
    wp-admin/dex_bccf.php?page=dex_bccf_demo - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/dex_bccf.php?page=dex_bccf_upgrade
    • > Network (severe)
    wp-admin/dex_bccf.php?page=dex_bccf_upgrade - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/dex_bccf.php
    • > Network (severe)
    wp-admin/dex_bccf.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

booking-calendar-contact-form/dex_bccf.php 92% from 13 tests

Analyzing the main PHP file in "Booking Calendar Contact Form" version 1.2.48
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("booking-calendar-contact-form.php" instead of "dex_bccf.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
There were no executable files found in this plugin12,402 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP138021424,425
PO File551,3671,9763,587
JavaScript63631773,466
CSS699170924

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions59
▷ Named functions5898.31%
▷ Anonymous functions11.69%
Constants105
▷ Global constants105100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png0.25KB0.15KB▼ 38.25%
css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png0.12KB0.18KB0.00%
css/images/close.png0.28KB0.16KB▼ 40.64%
css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png0.18KB0.08KB▼ 51.93%
css/cupertino/images/ui-icons_2694e8_256x240.png4.27KB4.11KB▼ 3.78%