83% vikbooking

Code Review | VikBooking Hotel Booking Engine & PMS

WordPress plugin VikBooking Hotel Booking Engine & PMS scored83%from 54 tests.

About plugin

  • Plugin page: vikbooking
  • Plugin version: 1.6.5
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 10, 2018
  • Latest release: Nov 13, 2023
  • Number of updates: 184
  • Update frequency: every 11.1 days
  • Top authors: e4jvikwp (100%)

Code review

54 tests

User reviews

48 reviews

Install metrics

7,000+ active /104,705 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲8.58MB] [CPU: ▲63.38ms] 75% from 4 tests

Server-side resources used by VikBooking Hotel Booking Engine & PMS
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 8.58MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /8.07 ▲4.60106.13 ▲63.71
Dashboard /wp-admin13.36 ▲10.01117.26 ▲57.20
Posts /wp-admin/edit.php13.22 ▲9.86127.33 ▲74.66
Add New Post /wp-admin/post-new.php15.80 ▲9.91167.38 ▲61.42
Media Library /wp-admin/upload.php13.16 ▲9.93106.86 ▲71.17

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 1,421 new files
Database: 44 new tables, 14 new options
New tables
wp_vikbooking_greview_service
wp_vikbooking_optionals
wp_vikbooking_restrictions
wp_vikbooking_translations
wp_vikbooking_reminders
wp_vikbooking_dispcost
wp_vikbooking_seasons
wp_vikbooking_categories
wp_vikbooking_tmplock
wp_vikbooking_operators
...
New WordPress options
vikbooking_license_hash
widget_recent-comments
theysaidso_admin_options
vikbooking_license_expdate
vikbooking_hide_vcmad
widget_recent-posts
vikbooking_changelog
widget_mod_vikbooking_horizontalsearch
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

VikBooking Hotel Booking Engine & PMS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,086 ▲32414.78 ▲0.449.08 ▲6.8635.82 ▼7.95
Dashboard /wp-admin2,397 ▲2235.69 ▲0.05118.10 ▲16.7045.04 ▲2.10
Posts /wp-admin/edit.php2,202 ▲1022.66 ▲0.6644.97 ▲6.8831.24 ▼4.67
Add New Post /wp-admin/post-new.php6,253 ▲4,71623.66 ▲0.47970.87 ▲295.4236.12 ▼18.87
Media Library /wp-admin/upload.php1,491 ▲915.12 ▲0.91112.56 ▲3.1546.82 ▲1.67

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_mod_vikbooking_horizontalsearch
    • widget_mod_vikbooking_currencyconverter
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 612× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/vikbooking/admin/views/editbusy/tmpl/default.php
    • > /wp-content/plugins/vikbooking/admin/helpers/widgets/forecast.php
    • > /wp-content/plugins/vikbooking/admin/layouts/sidepanel/multitasking.php
    • > /wp-content/plugins/vikbooking/admin/helpers/src/notification/display/reminder.php
    • > /wp-content/plugins/vikbooking/admin/views/gotopro/view.html.php
    • > /wp-content/plugins/vikbooking/libraries/html/rss/config.php
    • > /wp-content/plugins/vikbooking/admin/helpers/src/notification/displayer.php
    • > /wp-content/plugins/vikbooking/admin/helpers/src/factory/aware.php
    • > /wp-content/plugins/vikbooking/libraries/html/form/control/close.php
    • > /wp-content/plugins/vikbooking/libraries/html/changelog/section/close.php

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

vikbooking/vikbooking.php Passed 13 tests

This is the main PHP file of "VikBooking Hotel Booking Engine & PMS" version 1.6.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
Certified Booking Engine for Hotels and Accommodations.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected313,935 lines of code in 780 files:
LanguageFilesBlank linesComment linesLines of code
PHP65522,62568,994223,486
CSS4143050136,872
JavaScript343,6473,30519,513
PO File25,4906,28215,625
SVG4088,380
XSLT1108593,164
XSD4242,719
SQL16156422,260
Markdown471601,224
XML16312638
JSON10052
HTML2002

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,415)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 2,239)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity64.31
▷ Minimum class complexity1.00
▷ Maximum class complexity4,415.00
Average method complexity8.07
▷ Minimum method complexity1.00
▷ Maximum method complexity2,239.00
Code structure
Namespaces0
Interfaces11
Traits5
Classes463
▷ Abstract classes5712.31%
▷ Concrete classes40687.69%
▷ Final classes5212.81%
Methods4,113
▷ Static methods88321.47%
▷ Public methods3,24278.82%
▷ Protected methods69516.90%
▷ Private methods1764.28%
Functions391
▷ Named functions51.28%
▷ Anonymous functions38698.72%
Constants241
▷ Global constants18777.59%
▷ Class constants5422.41%
▷ Public constants54100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
547 PNG files occupy 3.05MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/resources/countries/MNG.png0.39KB0.39KB▼ 1.74%
admin/resources/countries/CHN.png0.31KB0.30KB▼ 5.61%
modules/mod_vikbooking_horizontalsearch/images/arrow.png47.02KB0.18KB▼ 99.61%
admin/resources/countries/VUT.png0.58KB0.58KB0.00%
admin/resources/countries/ROM.png0.15KB0.13KB▼ 14.47%