84% travel-booking-toolkit

Code Review | Travel Booking Toolkit

WordPress plugin Travel Booking Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: travel-booking-to...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2018
  • Latest release: Jun 7, 2023
  • Number of updates: 116
  • Update frequency: every 15.3 days
  • Top authors: wptravelengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /42,583 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Travel Booking Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9944.74 ▲6.31
Dashboard /wp-admin4.26 ▲0.9148.51 ▼12.74
Posts /wp-admin/edit.php4.31 ▲0.9554.63 ▲8.42
Add New Post /wp-admin/post-new.php6.80 ▲0.91102.12 ▲1.53
Media Library /wp-admin/upload.php4.12 ▲0.8941.29 ▲6.70

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 166 new files
Database: no new tables, 13 new options
New WordPress options
widget_travel_booking_toolkit_image_text_widget
widget_travel_booking_toolkit_recent_post
widget_travel_booking_toolkit_taxonomy_list
widget_travel_booking_toolkit_icon_text_widget
widget_theysaidso_widget
widget_travel_booking_toolkit_contact_social_links
widget_recent-comments
db_upgraded
widget_wptravelengine_client_logo_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Travel Booking Toolkit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /6,096 ▲3,35021.07 ▲6.6915.94 ▲14.1644.35 ▲0.55
Dashboard /wp-admin5,385 ▲3,2008.07 ▲3.17154.01 ▲32.2641.50 ▼0.01
Posts /wp-admin/edit.php5,282 ▲3,1935.55 ▲3.5488.02 ▲53.7935.63 ▲1.17
Add New Post /wp-admin/post-new.php3,176 ▲1,65725.07 ▲1.67713.06 ▲34.2039.03 ▼19.26
Media Library /wp-admin/upload.php4,576 ▲3,1857.37 ▲3.21135.29 ▲36.6144.33 ▼1.57

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
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • can_compress_scripts
    • widget_travel_booking_toolkit_icon_text_widget
    • widget_recent-posts
    • widget_travel_booking_toolkit_contact_social_links
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_wptravelengine_client_logo_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_travel_booking_toolkit_cta_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/widgets/widget-team-member.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/travel-muni/customizer/home/destination.php:215
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/class-travel-booking-toolkit-customizer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/travel-booking-toolkit/includes/customize-controls/class-editor-control.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/widgets/widget-icon-text.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Customize_Control' not found in wp-content/plugins/travel-booking-toolkit/includes/customize-controls/class-info-text.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/widgets/widget-contact.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/travel-booking-toolkit/includes/travel-muni/sections/popular.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/widgets/widget-recent-posts.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-booking-toolkit/includes/travel-muni/customizer/home/special.php:151

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: customization, travel-website, travel-booking, additional-functionality, widgets...

travel-booking-toolkit/travel-booking-toolkit.php Passed 13 tests

"Travel Booking Toolkit" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
125 characters long description:
Travel Booking Toolkit allows you to add extra functionality to the Customizer, Widgets Section in your WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin21,364 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PHP591,1641,73713,369
JavaScript119851,0716,781
CSS699211,162
XML10052

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity20.17
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods120
▷ Static methods32.50%
▷ Public methods11192.50%
▷ Protected methods32.50%
▷ Private methods65.00%
Functions93
▷ Named functions9298.92%
▷ Anonymous functions11.08%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/demo/clients-testi-single-gall-1.png3.75KB3.96KB0.00%
includes/travel-muni/images/demo/clients-testi-single-gall-2.png4.86KB4.96KB0.00%
images/demo/clients-testi-single-gall-2.png4.86KB4.96KB0.00%
images/demo/clients-testi-single-gall-3.png4.99KB5.12KB0.00%
includes/travel-muni/images/demo/clients-testi-single-gall-1.png3.75KB3.96KB0.00%