72% nd-travel

Code Review | Travel Management

WordPress plugin Travel Management scored 72% from 54 tests.

About plugin

  • Plugin page: nd-travel
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 5.8.1
  • First release: May 24, 2018
  • Latest release: Sep 1, 2021
  • Number of updates: 27
  • Update frequency: every 44.3 days
  • Top authors: nicdark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 24,209 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.32MB] [CPU: ▼153.84ms] Passed 4 tests

Server-side resources used by Travel Management
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.7644.19 ▲16.69
Dashboard /wp-admin3.71 ▲0.6652.48 ▼15.75
Posts /wp-admin/edit.php3.83 ▲0.7153.54 ▼5.71
Add New Post /wp-admin/post-new.php4.69 ▼0.7458.09 ▼599.28
Media Library /wp-admin/upload.php3.65 ▲0.6541.75 ▲5.40
Durations /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_13.6537.16
Add New /wp-admin/post-new.php?post_type=nd_travel_cpt_23.5936.86
Add New /wp-admin/post-new.php?post_type=nd_travel_cpt_13.5940.88
Difficulty /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_2&post_type=nd_travel_cpt_13.6543.39
Travel Plugin /wp-admin/admin.php?page=nd-travel-settings3.6338.92
Import Export /wp-admin/admin.php?page=nd-travel-settings-import-export3.6239.89
Min Age /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_33.6539.91
Packages /wp-admin/edit.php?post_type=nd_travel_cpt_13.7037.98
Difficulty /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_23.6536.81
Min Age /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_3&post_type=nd_travel_cpt_13.6536.91

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 201 new files
Database: 1 new table, no new options
New tables
wp_nd_travel_booking

Browser metrics Passed 4 tests

A check of browser resources used by Travel Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,972 ▲33516.74 ▲1.2212.18 ▲1.2247.75 ▼13.26
Dashboard /wp-admin3,144 ▲2106.10 ▲0.16142.78 ▼11.79123.48 ▼1.41
Posts /wp-admin/edit.php2,994 ▲2552.71 ▲0.0272.32 ▼2.2190.70 ▼8.09
Add New Post /wp-admin/post-new.php1,618 ▲318.58 ▼2.69385.96 ▲99.02114.47 ▼1.83
Media Library /wp-admin/upload.php1,981 ▲1745.05 ▲0.01156.28 ▲7.33128.23 ▲3.39
Durations /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_11,9072.5367.7683.66
Add New /wp-admin/post-new.php?post_type=nd_travel_cpt_23,5009.07231.28140.72
Add New /wp-admin/post-new.php?post_type=nd_travel_cpt_14,6249.61273.60152.80
Difficulty /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_2&post_type=nd_travel_cpt_11,9102.5467.3380.27
Travel Plugin /wp-admin/admin.php?page=nd-travel-settings1,5222.1666.5468.81
Import Export /wp-admin/admin.php?page=nd-travel-settings-import-export1,3592.3361.2574.12
Min Age /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_31,9072.5168.6183.51
Packages /wp-admin/edit.php?post_type=nd_travel_cpt_11,5772.6462.4272.79
Difficulty /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_21,9102.5470.3081.12
Min Age /wp-admin/edit-tags.php?taxonomy=nd_travel_cpt_1_tax_3&post_type=nd_travel_cpt_11,9072.5163.0888.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_nd_travel_booking

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+845
    Undefined index: nd_travel_meta_box_destinations
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+856
    Undefined index: nd_travel_meta_box_typologies
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+867
    Undefined index: nd_travel_meta_box_availability_from
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+878
    Undefined index: nd_travel_meta_box_availability_to
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+891
    Undefined index: nd_travel_meta_box_price
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+902
    Undefined index: nd_travel_meta_box_promotion_price
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+913
    Undefined index: nd_travel_meta_box_new_price
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+924
    Undefined index: nd_travel_meta_box_promo_price
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+937
    Undefined index: nd_travel_meta_box_image
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+948
    Undefined index: nd_travel_meta_box_image_position
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+959
    Undefined index: nd_travel_meta_box_page_layout
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+970
    Undefined index: nd_travel_meta_box_page_sidebar
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+981
    Undefined index: nd_travel_meta_box_related_packages
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+994
    Undefined index: nd_travel_meta_box_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1005
    Undefined index: nd_travel_meta_box_color_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1016
    Undefined index: nd_travel_meta_box_text_preview
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1027
    Undefined index: nd_travel_meta_box_featured_image_size
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1038
    Undefined index: nd_travel_meta_box_featured_image_replace
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1051
    Undefined index: nd_travel_meta_box_more_info_request_form
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1062
    Undefined index: nd_travel_meta_box_more_info_request_form_cf7
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1076
    Undefined index: nd_travel_meta_box_tab_map_tab_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1087
    Undefined index: nd_travel_meta_box_tab_map_section_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1098
    Undefined index: nd_travel_meta_box_tab_map_content
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1111
    Undefined index: nd_travel_meta_box_tab_gallery_tab_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1122
    Undefined index: nd_travel_meta_box_tab_gallery_section_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1133
    Undefined index: nd_travel_meta_box_tab_gallery_content
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1145
    Undefined index: nd_travel_meta_box_tab_program_tab_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1156
    Undefined index: nd_travel_meta_box_tab_program_section_title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-1.php+1167
    Undefined index: nd_travel_meta_box_tab_program_content
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+328
    Undefined index: nd_travel_meta_box_cpt_2_icon
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+339
    Undefined index: nd_travel_meta_box_cpt_2_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+350
    Undefined index: nd_travel_meta_box_cpt_2_text_preview
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+362
    Undefined index: nd_travel_meta_box_image_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+373
    Undefined index: nd_travel_meta_box_image_cpt_2_position
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+384
    Undefined index: nd_travel_meta_box_page_layout_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+396
    Undefined index: nd_travel_meta_box_agent_title_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+407
    Undefined index: nd_travel_meta_box_agent_descr_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+418
    Undefined index: nd_travel_meta_box_contact_title_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-2.php+430
    Undefined index: nd_travel_meta_box_contact_descr_cpt_2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+359
    Undefined index: nd_travel_meta_box_color_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+370
    Undefined index: nd_travel_meta_box_icon_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+381
    Undefined index: nd_travel_meta_box_text_preview_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+392
    Undefined index: nd_travel_meta_box_parent_destination
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+404
    Undefined index: nd_travel_meta_box_image_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+415
    Undefined index: nd_travel_meta_box_image_cpt_3_position
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+426
    Undefined index: nd_travel_meta_box_page_layout_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+438
    Undefined index: nd_travel_meta_box_country_title_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+449
    Undefined index: nd_travel_meta_box_country_descr_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+460
    Undefined index: nd_travel_meta_box_contact_title_cpt_3
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nd_travel_cpt_1
    • > Notice in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php+471
    Undefined index: nd_travel_meta_box_contact_descr_cpt_3

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nd-travel/addons/customizer/styles/default-style.php
  • 110× 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 wp_enqueue_script() in wp-content/plugins/nd-travel/addons/visual/packages/layout/layout-1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nd-travel/inc/metabox/mtb-cpt-3.php:5
    • > PHP Notice
      Undefined variable: nd_travel_search_component_id in wp-content/plugins/nd-travel/addons/visual/search/layout/layout-3.php on line 11
    • > PHP Notice
      Undefined variable: nd_travel_width in wp-content/plugins/nd-travel/addons/visual/search/layout/layout-1.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/nd-travel/addons/visual/typologies/layout/layout-1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/nd-travel/templates/single-cpt-1.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/nd-travel/inc/shortcodes/include/search-results/layout-2/nd_travel_post_preview-2.php:4
    • > PHP Notice
      Undefined variable: nd_travel_action in wp-content/plugins/nd-travel/addons/visual/search/layout/layout-2.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nd-travel/inc/cpt/cpt-2.php:21
    • > PHP Notice
      Undefined variable: nd_travel_labels in wp-content/plugins/nd-travel/addons/visual/search/layout/layout-1.php on line 14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: travel, booking, packages, tour, holiday

nd-travel/nd-travel.php 92% from 13 tests

The main file in "Travel Management" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 203 characters long)

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
There were no executable files found in this plugin9,990 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP774,3648327,650
SVG361331,346
CSS314053853
JavaScript36936141

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.25MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icons/icon-money-white.png4.08KB2.27KB▼ 44.20%
templates/cpt-2-layouts/icon-user-white.png19.42KB2.12KB▼ 89.10%
assets/img/icons/travel/icon-pin-grey.png4.22KB3.13KB▼ 25.76%
inc/shortcodes/include/search-results/layout-2/icon-list-white-opacity.png16.28KB1.54KB▼ 90.52%
templates/cpt-1-layouts/icon-typologies-greydark.png3.56KB3.10KB▼ 13.07%