77% bookwize-integrated-booking-engine

Code Review | Bookwize Integrated

WordPress plugin Bookwize Integrated scored77%from 54 tests.

About plugin

  • Plugin page: bookwize-integrat...
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-5.8
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Oct 6, 2021
  • Number of updates: 92
  • Update frequency: every 17.9 days
  • Top authors: bookwize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,455 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.27MB] [CPU: ▲4.19ms] Passed 4 tests

This is a short check of server-side resources used by Bookwize Integrated
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2949.18 ▲4.65
Dashboard /wp-admin3.62 ▲0.2761.97 ▼3.44
Posts /wp-admin/edit.php3.65 ▲0.3061.97 ▲8.14
Add New Post /wp-admin/post-new.php6.16 ▲0.27111.12 ▲7.42
Media Library /wp-admin/upload.php3.48 ▲0.2554.25 ▲16.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Bookwize Integrated
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7113.20 ▼1.221.63 ▼0.1037.35 ▼5.25
Dashboard /wp-admin2,235 ▲645.75 ▲0.1187.58 ▼4.1541.11 ▼1.11
Posts /wp-admin/edit.php2,145 ▲482.30 ▲0.3440.41 ▲1.3936.59 ▲0.69
Add New Post /wp-admin/post-new.php6,261 ▲4,73525.12 ▲7.58914.30 ▲248.8936.78 ▼23.49
Media Library /wp-admin/upload.php1,434 ▲344.47 ▲0.28117.32 ▲9.2053.59 ▲5.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bookwize-integrated-booking-engine/admin/partials/bookwize-integrated-admin-display.php
    • > /wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-header.php
    • > /wp-content/plugins/bookwize-integrated-booking-engine/admin/partials/bookwize-integrated-admin-flash-message.php
    • > /wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-form.php
    • > /wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bookwize-integrated-booking-engine/public/template-bookwize.php:2
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 35
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 49
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 45
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/bookwize-integrated-booking-engine/admin/partials/bookwize-integrated-admin-flash-message.php on line 2
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bookwize-integrated-booking-engine/admin/partials/bookwize-integrated-admin-meta-box.php:2
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 39
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-booking-engine/public/partials/bookwize-public-display.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/bookwize-integrated-booking-engine/admin/partials/bookwize-integrated-admin-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

bookwize-integrated-booking-engine/bookwize-integrated.php 77% from 13 tests

The main PHP script in "Bookwize Integrated" version 3.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bookwize-integrated-booking-engine.php" instead of "bookwize-integrated.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected34,493 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
CSS109656515,992
SVG7009,874
HTML184961622,274
JavaScript105992111,694
Sass1434341,656
LESS1434441,646
PHP253176261,327
Markdown15030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.38
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods74
▷ Static methods79.46%
▷ Public methods6486.49%
▷ Protected methods56.76%
▷ Private methods56.76%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.64MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/screenshot4.png67.80KB29.09KB▼ 57.10%
public/img/banner-772x250png.png80.83KB21.48KB▼ 73.43%
public/img/banner-1544x500.png94.08KB38.83KB▼ 58.73%
public/img/screenshot2.png168.09KB47.42KB▼ 71.79%
public/img/horizontal-arrow.png1.09KB0.20KB▼ 81.49%