74% multi-day-booking-calendar

Code Review | Multi-day Booking Calendar

WordPress plugin Multi-day Booking Calendar scored 74% from 54 tests.

About plugin

  • Plugin page: multi-day-booking...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 31, 2022
  • Latest release: Aug 15, 2022
  • Number of updates: 12
  • Update frequency: every 1.6 days
  • Top authors: matorel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 740 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.18MB] [CPU: ▼4.24ms] Passed 4 tests

An overview of server-side resources used by Multi-day Booking Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1749.77 ▲5.73
Dashboard /wp-admin3.46 ▲0.1657.39 ▼0.31
Posts /wp-admin/edit.php3.58 ▲0.2252.87 ▼19.33
Add New Post /wp-admin/post-new.php6.12 ▲0.2495.35 ▼0.88
Media Library /wp-admin/upload.php3.39 ▲0.1642.20 ▲3.58
Add New /wp-admin/post-new.php?post_type=mdbc3.4264.71
Common Settings /wp-admin/edit.php?post_type=mdbc&page=mdbc3.4138.31
Calendar /wp-admin/edit.php?post_type=mdbc3.4344.19

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 1 new table, 8 new options
New tables
wp_mdbc
New WordPress options
can_compress_scripts
mdbc_options
widget_recent-comments
mdbc_db_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Multi-day Booking Calendar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲21315.52 ▲2.3010.87 ▲3.6046.41 ▼3.11
Dashboard /wp-admin2,313 ▲1076.16 ▲0.28109.14 ▼1.8742.80 ▼2.10
Posts /wp-admin/edit.php2,202 ▲1133.20 ▲1.1544.45 ▲8.6532.91 ▲0.14
Add New Post /wp-admin/post-new.php1,576 ▲4223.85 ▲0.78740.15 ▲67.0257.70 ▲6.08
Media Library /wp-admin/upload.php1,504 ▲1135.66 ▲1.48105.68 ▲6.8145.33 ▲0.18
Add New /wp-admin/post-new.php?post_type=mdbc2,0566.51175.99120.44
Common Settings /wp-admin/edit.php?post_type=mdbc&page=mdbc1,9555.31149.3380.72
Calendar /wp-admin/edit.php?post_type=mdbc1,1663.2141.7028.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mdbc
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • mdbc_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • mdbc_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/multi-day-booking-calendar/includes/endpoints.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: schedule, reserve, multi-day, contact form7, calendar...

multi-day-booking-calendar/multi-day-booking-calendar.php Passed 13 tests

The main file in "Multi-day Booking Calendar" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
89 characters long description:
This plugin allows you to integrate a multi-day booking calendar into your existing form.

Code Analysis Passed 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 plugin18,762 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34,1433,73217,597
PHP4134175858
PO File17879175
CSS124105
SVG10126
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity67.00
▷ Minimum class complexity67.00
▷ Maximum class complexity67.00
Average method complexity6.38
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods418.18%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected