77% bookwize-booking-form

Code Review | Bookwize Form

WordPress plugin Bookwize Form scored77%from 54 tests.

About plugin

  • Plugin page: bookwize-booking-...
  • Plugin version: 1.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Jan 10, 2020
  • Number of updates: 79
  • Update frequency: every 16.1 days
  • Top authors: bookwize (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,405 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
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▲3.46ms] Passed 4 tests

Server-side resources used by Bookwize Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.91 ▲5.09
Dashboard /wp-admin3.51 ▲0.2154.11 ▲2.69
Posts /wp-admin/edit.php3.60 ▲0.2551.18 ▲1.70
Add New Post /wp-admin/post-new.php6.11 ▲0.2295.35 ▲4.37
Media Library /wp-admin/upload.php3.43 ▲0.2042.41 ▲7.48

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_bookwize_form_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
bwf_theme
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Bookwize Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20014.32 ▼0.427.09 ▲5.3236.71 ▼4.67
Dashboard /wp-admin2,243 ▲525.15 ▲0.26109.64 ▲7.0841.25 ▼2.82
Posts /wp-admin/edit.php2,128 ▲362.31 ▲0.3134.34 ▼6.2932.10 ▼3.58
Add New Post /wp-admin/post-new.php1,542 ▲2817.54 ▼0.15652.82 ▼31.5435.83 ▼24.92
Media Library /wp-admin/upload.php1,422 ▲344.40 ▲0.16106.12 ▼6.8645.75 ▼1.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_bookwize_form_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
Everything seems fine, however this is by no means 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bookwize-booking-form/admin/partials/bookwize-form-admin-flash-message.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bookwize-booking-form/public/partials/bookwize-guest-types.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bookwize-booking-form/includes/class-bookwize-form-widget.php:9
    • > PHP Notice
      Undefined variable: bwf_hotel_id in wp-content/plugins/bookwize-booking-form/public/bookwize-form-template.php on line 71
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/bookwize-booking-form/admin/partials/bookwize-form-admin-flash-message.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/bookwize-booking-form/admin/partials/bookwize-form-admin-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bookwize-booking-form/public/bookwize-form-template.php:80
    • > PHP Notice
      Undefined variable: bwf_hotel_url in wp-content/plugins/bookwize-booking-form/public/bookwize-form-template.php on line 68
    • > PHP Notice
      Undefined variable: bwf_api_key in wp-content/plugins/bookwize-booking-form/public/bookwize-form-template.php on line 70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #7 (/assets/banner-772x250.png), #8 (/assets/banner-1544x500.png)
You can look at the official readme.txt

bookwize-booking-form/bookwize-form.php 77% from 13 tests

The principal PHP file in "Bookwize Form" v. 1.9.7 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bookwize-booking-form.php" instead of "bookwize-form.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
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin3,979 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS730202,584
PHP212617271,101
JavaScript32410293
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity4.54
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods66
▷ Static methods710.61%
▷ Public methods5887.88%
▷ Protected methods34.55%
▷ Private methods57.58%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.15MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/banner-1544x500.png104.88KB43.53KB▼ 58.50%
public/img/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
public/img/banner-772x250.png40.31KB17.71KB▼ 56.07%
public/img/icon-calendar.png0.11KB0.11KB0.00%