77% tour-booking-manager

Code Review | Travel Booking Plugin | Tour & Hotel Booking Solution For WooCommerce – WpTravelly

WordPress plugin Travel Booking Plugin | Tour & Hotel Booking Solution For WooCommerce – WpTravelly scored77%from 54 tests.

About plugin

  • Plugin page: tour-booking-manager
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2021
  • Latest release: Nov 23, 2023
  • Number of updates: 95
  • Update frequency: every 10.6 days
  • Top authors: magepeopleteam (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /23,980 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.53ms] Passed 4 tests

An overview of server-side resources used by Travel Booking Plugin | Tour & Hotel Booking Solution For WooCommerce – WpTravelly
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2438.18 ▼5.08
Dashboard /wp-admin3.55 ▲0.2546.92 ▼4.31
Posts /wp-admin/edit.php3.66 ▲0.3148.36 ▲1.98
Add New Post /wp-admin/post-new.php6.15 ▲0.2687.69 ▼2.72
Media Library /wp-admin/upload.php3.47 ▲0.2438.88 ▲4.11
Quick Setup /wp-admin/admin.php?page=ttbm_quick_setup3.4434.40
Tour /wp-admin/admin.php?page=ttbm_tour3.4432.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Travel Booking Plugin | Tour & Hotel Booking Solution For WooCommerce – WpTravelly
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,015 ▲25314.38 ▼0.331.65 ▼0.1641.81 ▼4.07
Dashboard /wp-admin2,414 ▲2375.81 ▲0.26104.95 ▲4.0741.12 ▼5.64
Posts /wp-admin/edit.php2,280 ▲1802.28 ▲0.3449.11 ▲8.4535.27 ▼8.48
Add New Post /wp-admin/post-new.php1,564 ▲2023.58 ▼1.55675.96 ▲31.2555.81 ▼6.49
Media Library /wp-admin/upload.php1,652 ▲2614.39 ▲0.20104.29 ▲3.6242.59 ▼0.84
Quick Setup /wp-admin/admin.php?page=ttbm_quick_setup1,1182.1446.1751.96
Tour /wp-admin/admin.php?page=ttbm_tour1,1212.1545.9844.09

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/tour-booking-manager/support/elementor/elementor-support.php:48
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tour-booking-manager/support/elementor/elementor-support.php on line 47
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/tour-booking-manager/support/elementor/elementor-support.php on line 47
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/tour-booking-manager/support/elementor/elementor-support.php on line 47

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=ttbm_quick_setup
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: ttbm_date_format is not defined" "ReferenceError: ttbm_date_format is not defined\n at mp_load_date_picker (/wp-content/plugins/tour-booking-manager/assets/helper/mp_style/mp_script.js?ver=1700876169:79:15)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/tour-booking-manager/assets/helper/mp_style/mp_script.js?ver=1700876169:97:3)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=ttbm_quick_setup
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).select2 is not a function" "TypeError: $(...).select2 is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/tour-booking-manager/assets/admin/mp_admin_settings.js?ver=1700876169:16:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ttbm_tour
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: ttbm_date_format is not defined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ttbm_tour
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).select2 is not a function
    • > GET request to /wp-admin/admin.php?page=ttbm_tour
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: ttbm_date_format is not defined" "ReferenceError: ttbm_date_format is not defined\n at mp_load_date_picker (/wp-content/plugins/tour-booking-manager/assets/helper/mp_style/mp_script.js?ver=1700876170:79:15)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/tour-booking-manager/assets/helper/mp_style/mp_script.js?ver=1700876170:97:3)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=ttbm_tour
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).select2 is not a function" "TypeError: $(...).select2 is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/tour-booking-manager/assets/admin/mp_admin_settings.js?ver=1700876170:16:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #21, #22, #3, #4, #5, #6, #7, #8, #9 in tour-booking-manager/assets to your readme.txt
Please take inspiration from this readme.txt

tour-booking-manager/tour-booking-manager.php 85% from 13 tests

The primary PHP file in "Travel Booking Plugin | Tour & Hotel Booking Solution For WooCommerce – WpTravelly" version 1.6.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4.0" instead of "3.0.9")
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 84 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected67,074 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PHP1232,4401,13526,175
CSS212,10950911,079
SVG3009,552
PO File73,5113,9608,159
JavaScript201,1011,2466,108
Sass30601735,997
Markdown1304

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,411)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 120)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity67.95
▷ Minimum class complexity1.00
▷ Maximum class complexity2,411.00
Average method complexity6.44
▷ Minimum method complexity1.00
▷ Maximum method complexity120.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes57
▷ Abstract classes00.00%
▷ Concrete classes57100.00%
▷ Final classes00.00%
Methods699
▷ Static methods15622.32%
▷ Public methods64391.99%
▷ Protected methods91.29%
▷ Private methods476.72%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
36 PNG files occupy 0.46MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/helper/images/calendar.png0.58KB0.57KB▼ 1.01%
assets/helper/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
assets/helper/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/helper/images/arrow_up.png1.03KB0.23KB▼ 77.65%
assets/helper/images/welcome/withMage.png50.10KB19.94KB▼ 60.21%