76% book-serve-reservations

Code Review | BookServe Online Booking Calendar

WordPress plugin BookServe Online Booking Calendar scored76%from 54 tests.

About plugin

  • Plugin page: book-serve-reserv...
  • Plugin version: 3.2RC...
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-8.0
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: Jun 28, 2022
  • Number of updates: 16
  • Update frequency: every 161.8 days
  • Top authors: bryanmceleney (81.25%)vinylmatt (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.20ms] Passed 4 tests

Analyzing server-side resources used by BookServe Online Booking Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.32 ▼4.86
Dashboard /wp-admin3.31 ▲0.0046.86 ▲1.11
Posts /wp-admin/edit.php3.36 ▲0.0042.15 ▲0.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.56 ▼9.54
Media Library /wp-admin/upload.php3.23 ▲0.0036.33 ▲3.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for BookServe Online Booking Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.441.66 ▼0.1047.13 ▲2.06
Dashboard /wp-admin2,195 ▲215.57 ▼0.1585.01 ▼13.4136.68 ▼9.53
Posts /wp-admin/edit.php2,100 ▲32.12 ▲0.1239.39 ▲2.6536.82 ▲0.42
Add New Post /wp-admin/post-new.php1,528 ▲222.83 ▼0.02606.59 ▼14.3383.33 ▲19.28
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.04100.97 ▲3.5645.28 ▲1.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/book-serve-reservations/book_serve_booking_form/booking_form.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/book-serve-reservations/vm_wordpress_widget.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vmbf_option() in wp-content/plugins/book-serve-reservations/config.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === book-serve-reservations === )
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please a description for screenshot #10 in book-serve-reservations/assets to your readme.txt
You can look at the official readme.txt

book-serve-reservations/vm_wordpress_widget.php 77% from 13 tests

"BookServe Online Booking Calendar" version 3.2RC...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.6" instead of "6.0")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "3.2RC...")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("book-serve-reservations.php" instead of "vm_wordpress_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin837 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP535555552
CSS1740158
JavaScript18411126
HTML1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.50MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
book_serve_booking_form/unselected_dot_functional.png0.72KB0.31KB▼ 56.97%
assets/banner-1544x500.png339.87KB127.20KB▼ 62.57%
book_serve_booking_form/green_dot.png0.81KB0.60KB▼ 26.03%
assets/banner-772x250.png118.04KB40.08KB▼ 66.05%
book_serve_booking_form/unselected_dot.png0.72KB0.31KB▼ 56.97%