83% booklet-booking-system

Code Review | Booklet - Hotel booking system by user email

WordPress plugin Booklet - Hotel booking system by user email scored83%from 54 tests.

About plugin

  • Plugin page: booklet-booking-s...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Nov 16, 2023
  • Number of updates: 9
  • Update frequency: every 282.7 days
  • Top authors: unitetheme (66.67%)themeatelier (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /770 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲1.63ms] Passed 4 tests

Server-side resources used by Booklet - Hotel booking system by user email
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1237.12 ▼2.06
Dashboard /wp-admin3.44 ▲0.1351.31 ▲2.88
Posts /wp-admin/edit.php3.55 ▲0.1952.30 ▲7.04
Add New Post /wp-admin/post-new.php6.04 ▲0.1594.58 ▲4.99
Media Library /wp-admin/upload.php3.36 ▲0.1335.32 ▲0.71
All Restaurant Booking /wp-admin/edit.php?post_type=restaurant-booking3.4036.58
Add New /wp-admin/post-new.php?post_type=restaurant-booking3.4042.94
Booklet Settings /wp-admin/options-general.php?page=booklet-setting-admin3.3333.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booklet - Hotel booking system by user email
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18013.67 ▼0.6810.23 ▲8.4739.85 ▼3.82
Dashboard /wp-admin2,243 ▲664.85 ▼0.8393.43 ▼6.2241.79 ▼6.15
Posts /wp-admin/edit.php2,154 ▲512.19 ▲0.2537.95 ▲3.4533.01 ▼3.28
Add New Post /wp-admin/post-new.php1,567 ▲4123.20 ▼0.30623.15 ▼65.1955.83 ▼4.96
Media Library /wp-admin/upload.php1,451 ▲484.21 ▲0.04100.97 ▲0.1943.96 ▼3.06
All Restaurant Booking /wp-admin/edit.php?post_type=restaurant-booking1,1182.1632.3427.81
Add New /wp-admin/post-new.php?post_type=restaurant-booking1,6062.6551.2758.78
Booklet Settings /wp-admin/options-general.php?page=booklet-setting-admin8771.8625.7230.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booklet-booking-system/admin/Booklet-Admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/booklet-booking-system/inc/classes/Booklet-Enqueue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booklet-booking-system/inc/classes/Booklet-Mail.php:7

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 issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Plugin Name: Please specify the plugin name on the first line ( === booklet-booking-system === )
You can take inspiration from this readme.txt

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

The main file in "Booklet - Hotel booking system by user email" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("booklet-booking-system.php" instead of "booklet.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,672 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS451451,113
PHP818578534
SVG10014
JavaScript314611

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%