84% guestplan-booking-widget

Code Review | Guestplan Booking Widget

WordPress plugin Guestplan Booking Widget scored84%from 54 tests.

About plugin

  • Plugin page: guestplan-booking...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Oct 28, 2023
  • Number of updates: 21
  • Update frequency: every 57.8 days
  • Top authors: guestplan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼12.92ms] Passed 4 tests

A check of server-side resources used by Guestplan Booking Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▼0.0133.32 ▼11.72
Dashboard /wp-admin3.34 ▲0.0348.10 ▼2.54
Posts /wp-admin/edit.php3.39 ▼0.4642.22 ▼11.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.05 ▼24.07
Media Library /wp-admin/upload.php3.26 ▲0.0331.09 ▼4.16
Guestplan Widget /wp-admin/options-general.php?page=guestplan3.2533.70

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Guestplan Booking Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.06 ▼0.251.47 ▼0.2240.11 ▲2.36
Dashboard /wp-admin2,216 ▲365.61 ▼0.0081.53 ▼5.8238.92 ▼2.31
Posts /wp-admin/edit.php2,121 ▲242.00 ▼0.0435.10 ▲2.1331.16 ▼4.90
Add New Post /wp-admin/post-new.php1,552 ▲1417.96 ▼5.23618.57 ▼73.4251.80 ▼6.85
Media Library /wp-admin/upload.php1,418 ▲214.19 ▼0.0296.24 ▼10.5840.70 ▼2.53
Guestplan Widget /wp-admin/options-general.php?page=guestplan8722.1423.9527.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/guestplan-booking-widget/admin/partials/guestplan-admin-display.php
    • > /wp-content/plugins/guestplan-booking-widget/public/partials/guestplan-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: bookings, restaurant, reservations

guestplan-booking-widget/guestplan.php 85% from 13 tests

The entry point to "Guestplan Booking Widget" version 1.0.9 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("guestplan-booking-widget.php" instead of "guestplan.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin459 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP13190518459

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3485.00%
▷ Protected methods00.00%
▷ Private methods615.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin