79% turisbook-booking-system

Code Review | Turisbook Booking System

WordPress plugin Turisbook Booking System scored79%from 54 tests.

About plugin

  • Plugin page: turisbook-booking...
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2021
  • Latest release: Oct 26, 2023
  • Number of updates: 32
  • Update frequency: every 23.2 days
  • Top authors: turisbook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /973 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲0.91ms] Passed 4 tests

Analyzing server-side resources used by Turisbook Booking System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6943.45 ▲5.56
Dashboard /wp-admin3.98 ▲0.6852.38 ▲8.16
Posts /wp-admin/edit.php4.03 ▲0.6847.75 ▲3.68
Add New Post /wp-admin/post-new.php6.54 ▲0.6683.41 ▼10.01
Media Library /wp-admin/upload.php3.84 ▲0.6139.49 ▲4.42
Turisbook Booking System /wp-admin/tools.php?page=turisbook-booking-system3.8437.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 112 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Turisbook Booking System: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21313.88 ▼0.5318.52 ▲16.8441.19 ▲2.07
Dashboard /wp-admin2,226 ▲495.58 ▲0.0484.31 ▼4.2739.76 ▼0.83
Posts /wp-admin/edit.php2,131 ▲312.04 ▲0.0435.14 ▼0.9732.01 ▼1.68
Add New Post /wp-admin/post-new.php1,546 ▲1823.10 ▲0.01671.15 ▼5.5565.22 ▲7.84
Media Library /wp-admin/upload.php1,431 ▲344.19 ▲0.0097.36 ▼0.7643.94 ▼5.80
Turisbook Booking System /wp-admin/tools.php?page=turisbook-booking-system1,0362.0425.5227.01

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 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-grid.php
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-seasons.php
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-amenities.php
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-resume-body.php
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-room-map.php
    • > /wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-public-display.php
  • 74× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-resume-body.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/turisbook-booking-system/public/partials/payments/turisbook-booking-system-cc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-calendar.php:68
    • > PHP Notice
      Undefined variable: selected in wp-content/plugins/turisbook-booking-system/public/partials/payments/turisbook-booking-system-cc.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-confirmation.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/turisbook-booking-system/public/shortcodes/turisbook-booking-system-map.php:26
    • > PHP Notice
      Undefined variable: units in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-grid.php on line 9
    • > PHP Notice
      Undefined variable: prev_year in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-calendar.php on line 66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/turisbook-booking-system/public/partials/taxonomy-turisbook_amenity.php:2
    • > PHP Warning
      include(TURISBOOK_PUBLIC_PATH/partials/turisbook-booking-system-resume-body-price.php): failed to open stream: No such file or directory in wp-content/plugins/turisbook-booking-system/public/partials/turisbook-booking-system-resume-body.php on line 45

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: turisbook, booking

turisbook-booking-system/turisbook-booking-system.php Passed 13 tests

The main PHP file in "Turisbook Booking System" ver. 1.2.9 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
Connect your webiste with the Turisbook.com platform API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin21,527 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
CSS1438410211,312
JavaScript207163245,514
PHP609076213,866
PO File2389474835

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods73
▷ Static methods810.96%
▷ Public methods5980.82%
▷ Protected methods00.00%
▷ Private methods1419.18%
Functions50
▷ Named functions4998.00%
▷ Anonymous functions12.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/poweredby_logo.png1.80KB1.62KB▼ 9.73%
public/img/visa.png23.69KB8.65KB▼ 63.47%
public/img/mastercard.png28.63KB10.54KB▼ 63.19%