77% dtravel-booking

Code Review | Dtravel Booking

WordPress plugin Dtravel Booking scored77%from 54 tests.

About plugin

  • Plugin page: dtravel-booking
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2023
  • Latest release: Feb 27, 2023
  • Number of updates: 9
  • Update frequency: every 2.9 days
  • Top authors: nickdtravel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /279 total downloads

Benchmarks

Plugin footprint 82% 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.06MB] [CPU: ▲229.50ms] 75% from 4 tests

Server-side resources used by Dtravel Booking
Please take the time to fix the following items
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 229.50ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.13285.96 ▲245.77
Dashboard /wp-admin3.40 ▲0.06287.67 ▲232.98
Posts /wp-admin/edit.php3.45 ▲0.09287.00 ▲236.59
Add New Post /wp-admin/post-new.php5.47 ▼0.42304.24 ▲205.50
Media Library /wp-admin/upload.php3.26 ▲0.03280.04 ▲242.92

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_dtravel_booking_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Dtravel Booking
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21219.35 ▲5.00164.81 ▲162.9851.76 ▲7.49
Dashboard /wp-admin2,195 ▲155.62 ▼0.0594.72 ▲9.8241.06 ▲4.39
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0232.31 ▼9.4737.19 ▼2.15
Add New Post /wp-admin/post-new.php1,532 ▲418.50 ▼4.45627.51 ▼30.6862.89 ▲6.84
Media Library /wp-admin/upload.php1,403 ▲34.11 ▼0.1198.21 ▼16.4444.15 ▼3.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_dtravel_booking_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dtravel-booking/dtravel-booking-widget.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dtravel-booking/includes/custom-field.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dtravel-booking/includes/tax.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Widget Config), #2 (Widget Display)
Please take inspiration from this readme.txt

dtravel-booking/dtravel-booking-widget.php 85% from 13 tests

Analyzing the main PHP file in "Dtravel Booking" version 1.1.3
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dtravel-booking.php" instead of "dtravel-booking-widget.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected3,327 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63021431,468
CSS49412941
PHP43119628
SVG300290

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity15.00
▷ Maximum class complexity19.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1055.56%
▷ Protected methods00.00%
▷ Private methods844.44%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin