10% exalogic-oberon-hotel-reservation

Code Review | OBERON - Hotel reservation

WordPress plugin OBERON - Hotel reservation scored 10% from 54 tests.

About plugin

  • Plugin page: exalogic-oberon-h...
  • Plugin version: 1.4.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Jun 6, 2023
  • Number of updates: 48
  • Update frequency: every 43.3 days
  • Top authors: mariomoravcik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,743 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; OBERON_HotelReservation has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼50.29ms] Passed 4 tests

A check of server-side resources used by OBERON - Hotel reservation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.38 ▼37.35
Dashboard /wp-admin2.18 ▼1.127.66 ▼41.28
Posts /wp-admin/edit.php2.18 ▼1.176.71 ▼41.04
Add New Post /wp-admin/post-new.php2.18 ▼3.706.33 ▼81.49
Media Library /wp-admin/upload.php2.18 ▼1.046.13 ▼29.94
OBERON - Hotel reservation /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation2.185.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_oberon_hotelreservation
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for OBERON - Hotel reservation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.35 ▼1.041.69 ▼1.3745.55 ▼3.74
Dashboard /wp-admin2,227 ▲394.99 ▼0.06115.65 ▲4.3243.38 ▲4.52
Posts /wp-admin/edit.php2,110 ▲212.24 ▲0.2534.32 ▼5.8035.61 ▲0.22
Add New Post /wp-admin/post-new.php1,532 ▲1123.46 ▲0.39672.27 ▼21.2238.12 ▼14.05
Media Library /wp-admin/upload.php1,412 ▲244.39 ▲0.2198.55 ▼5.3441.22 ▼5.49
OBERON - Hotel reservation /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation9862.16108.1344.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; OBERON_HotelReservation has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_oberon_hotelreservation
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Deprecated in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_widget.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; OBERON_HotelReservation has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in OBERON_HotelReservation is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+71
    Undefined index: service-url
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+72
    Undefined index: calc-accommodation
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+73
    Undefined index: calc-localtax
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+74
    Undefined index: calc-services
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+75
    Undefined index: roomtype-change
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+76
    Undefined index: price-category-guest
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+352
    Undefined variable: response
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > POST request to /index.php/wp-json/oberonweb/v1.1/hotel/GetHotel_PriceCategoryGuests
    • > Notice in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php+353
    Undefined index: userData

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_widget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_rest_controller.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=exalogic-oberon-hotel-reservation
    • > Network (severe)
    wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: bb, bnb, oberon, reservation system, booking

exalogic-oberon-hotel-reservation/exalogic_oberon_hotel_reservation_plugin.php 85% from 13 tests

The main file in "OBERON - Hotel reservation" v. 1.4.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("exalogic-oberon-hotel-reservation.php" instead of "exalogic_oberon_hotel_reservation_plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin5,306 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS531362,141
JavaScript92161731,924
PHP52654341,075
PO File13239126
SVG128040

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity17.67
▷ Minimum class complexity15.00
▷ Maximum class complexity21.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods4676.67%
▷ Protected methods23.33%
▷ Private methods1220.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants960.00%
▷ Class constants640.00%
▷ Public constants6100.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
PNG images were not found in this plugin