78% hotel-spider

Code Review | HS Direct Booking

WordPress plugin HS Direct Booking scored78%from 54 tests.

About plugin

  • Plugin page: hotel-spider
  • Plugin version: 1.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 31, 2020
  • Latest release: Jul 16, 2021
  • Number of updates: 31
  • Update frequency: every 12.1 days
  • Top authors: hotelspider (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /820 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼5.01ms] Passed 4 tests

Server-side resources used by HS Direct Booking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3048.00 ▲4.23
Dashboard /wp-admin3.63 ▲0.2845.31 ▼15.21
Posts /wp-admin/edit.php3.68 ▲0.3248.63 ▼2.20
Add New Post /wp-admin/post-new.php6.15 ▲0.2685.93 ▼5.03
Media Library /wp-admin/upload.php3.49 ▲0.2635.67 ▲2.39
Dashboard /wp-admin/admin.php?page=hs_booking_engine3.4630.93
Settings /wp-admin/admin.php?page=hs_booking_engine_settings3.4632.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 82 new files
Database: no new tables, 7 new options
New WordPress options
hs_booking_engine
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for HS Direct Booking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21814.00 ▼0.3810.65 ▲8.0236.09 ▼32.93
Dashboard /wp-admin2,246 ▲555.79 ▲0.90109.56 ▼9.2391.52 ▲47.87
Posts /wp-admin/edit.php2,135 ▲641.98 ▼0.0439.94 ▲2.9133.76 ▼1.75
Add New Post /wp-admin/post-new.php6,217 ▲4,69718.91 ▼4.37912.00 ▲223.10157.25 ▲106.84
Media Library /wp-admin/upload.php1,431 ▲464.19 ▼0.1195.44 ▼4.5667.92 ▲26.58
Dashboard /wp-admin/admin.php?page=hs_booking_engine8212.0227.7131.43
Settings /wp-admin/admin.php?page=hs_booking_engine_settings1,4142.2835.1834.80

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • hs_booking_engine
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hotel-spider/hs-direct-booking.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Base\\BaseController' not found in wp-content/plugins/hotel-spider/hsbeinc/Base/Enqueue.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hotel-spider/templates/adminSettings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Api\\BookingEngineFields' not found in wp-content/plugins/hotel-spider/hsbeinc/Frontend/DisplayWidget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Base\\BaseController' not found in wp-content/plugins/hotel-spider/hsbeinc/Base/Gutenberg.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hotel-spider/templates/adminDashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Base\\BaseController' not found in wp-content/plugins/hotel-spider/hsbeinc/Pages/Admin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Base\\BaseController' not found in wp-content/plugins/hotel-spider/hsbeinc/Base/SettingsLinks.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'HSBEInc\\Base\\BaseController' not found in wp-content/plugins/hotel-spider/hsbeinc/Api/Callbacks/AdminCallbacks.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: hospitality, booking, hotelspider, hotel-spider

hotel-spider/hs-direct-booking.php 85% from 13 tests

The primary PHP file in "HS Direct Booking" version 1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hotel-spider.php" instead of "hs-direct-booking.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 680 characters long)

Code Analysis Passed 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 detected20,697 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JSON40017,727
PHP252352591,423
PO File145443371,369
JavaScript3266121
CSS10026
SVG11125
YAML1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.27
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods69
▷ Static methods811.59%
▷ Public methods6594.20%
▷ Protected methods00.00%
▷ Private methods45.80%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
No PNG images were found in this plugin