46% rise-hotel-booking

Code Review | Rise Hotel Booking

WordPress plugin Rise Hotel Booking scored46%from 54 tests.

About plugin

  • Plugin page: rise-hotel-booking
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Jun 13, 2022
  • Number of updates: 6
  • Update frequency: every 4.3 days
  • Top authors: thedoctor13 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /934 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▼7.01ms] Passed 4 tests

This is a short check of server-side resources used by Rise Hotel Booking
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9645.49 ▲0.83
Dashboard /wp-admin4.13 ▲0.8245.21 ▼2.19
Posts /wp-admin/edit.php4.19 ▲0.8442.30 ▼5.20
Add New Post /wp-admin/post-new.php6.43 ▲0.5580.09 ▼21.49
Media Library /wp-admin/upload.php4.13 ▲0.9041.92 ▲9.30
Activity Log /wp-admin/edit.php?post_type=rise_room&page=rise_activity_log4.1336.42
Settings /wp-admin/edit.php?post_type=rise_room&page=rise_settings4.4145.54
Coupon Codes /wp-admin/edit.php?post_type=rise_coupon4.1741.80
Close Rooms /wp-admin/edit.php?post_type=rise_room&page=rise_close_rooms4.1435.67
Custom Rates /wp-admin/edit.php?post_type=rise_pricing_rate4.1939.54
Pricing Plans /wp-admin/edit.php?post_type=rise_room&page=rise_pricing_plans4.2037.66
Add New Room /wp-admin/post-new.php?post_type=rise_room4.2142.65
Bookings /wp-admin/edit.php?post_type=rise_booking4.1739.37
Rooms /wp-admin/edit.php?post_type=rise_room4.1736.24

Server storage [IO: ▲4.33MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 694 new files
Database: 5 new tables, 15 new options
New tables
wp_rise_activity_log
wp_rise_pricing_plans
wp_rise_pricing_plans_meta
wp_rise_closed_rooms
wp_rise_booking_details
New WordPress options
rise_admin-mail-template
rise_advance-payment
widget_theysaidso_widget
db_upgraded
rise_mail-enabled
rise_show-in-footer-and-checkout
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
rise_enable-offline-payments
...

Browser metrics Passed 4 tests

Rise Hotel Booking: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,050 ▲29315.70 ▲1.0815.08 ▲12.9323.36 ▼24.29
Dashboard /wp-admin2,297 ▲1126.42 ▲0.59108.53 ▲11.3953.59 ▲9.41
Posts /wp-admin/edit.php2,162 ▲733.18 ▲1.1950.67 ▲9.8541.11 ▲4.53
Add New Post /wp-admin/post-new.php1,750 ▲23624.15 ▲6.46668.67 ▲58.0043.31 ▼10.88
Media Library /wp-admin/upload.php1,482 ▲915.67 ▲1.49104.88 ▲6.6748.08 ▲3.38
Activity Log /wp-admin/edit.php?post_type=rise_room&page=rise_activity_log1,0373.5356.9237.45
Settings /wp-admin/edit.php?post_type=rise_room&page=rise_settings1,6662.8536.3257.63
Coupon Codes /wp-admin/edit.php?post_type=rise_coupon1,1673.2150.0435.68
Close Rooms /wp-admin/edit.php?post_type=rise_room&page=rise_close_rooms9333.0138.4528.64
Custom Rates /wp-admin/edit.php?post_type=rise_pricing_rate2,0513.1840.5736.02
Pricing Plans /wp-admin/edit.php?post_type=rise_room&page=rise_pricing_plans1,0323.0739.8229.38
Add New Room /wp-admin/post-new.php?post_type=rise_room2,80110.44216.6783.92
Bookings /wp-admin/edit.php?post_type=rise_booking1,1673.1942.1133.47
Rooms /wp-admin/edit.php?post_type=rise_room1,1433.2038.7733.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_rise_pricing_plans
    • wp_rise_pricing_plans_meta
    • wp_rise_activity_log
    • wp_rise_closed_rooms
    • wp_rise_booking_details
  • This plugin does not fully uninstall, leaving 15 options in the database
    • rise_enable-offline-payments
    • rise_advance-payment
    • rise_notification-mail-addresses
    • rise_currency
    • rise_show-in-footer-and-checkout
    • widget_theysaidso_widget
    • rise_tax
    • db_upgraded
    • rise_customer-mail-template
    • theysaidso_admin_options
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rise_room
    • > Notice in wp-content/plugins/rise-hotel-booking/rise-hotel-booking.php+215
    Undefined index: page
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rise_room&page=rise_pricing_plans
    • > Notice in wp-content/plugins/rise-hotel-booking/View/AdminPanel/PricingPlans.php+86
    Undefined index: rise_room_id

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 fix the following
  • 73× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/retrieve_pay_with_iyzico_result.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/approve.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/submerchant_payment_item_update.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/create_payment_with_registered_card.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/create_threeds_payment.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/subscription-samples/delete_pricing_plan.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/retrieve_installments.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/cancel.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/create_payment.php
    • > /wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/samples/subscription-samples/create_subscription_with_checkout_form.php
  • 559× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/Service/RefundService.php:7
    • > PHP Warning
      Use of undefined constant RISE_LOCATION - assumed 'RISE_LOCATION' (this will throw an Error in a future version of PHP) in wp-content/plugins/rise-hotel-booking/Controller/PricingPlansController.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Model\\Mapper\\RefundResourceMapper' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/src/Iyzipay/Model/Mapper/RefundChargedFromMerchantMapper.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/Issuing/CardDetails.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Iyzipay\\JsonConvertible' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/iyzipay/src/Iyzipay/BaseModel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/RecipientTransfer.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/Identity/VerificationReport.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/Recipient.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/lib/Order.php:40
    • > PHP Warning
      include_once(): Failed opening 'RISE_LOCATION/Controller/PaymentController.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/rise-hotel-booking/Controller/Shortcode/RoomCheckoutShortcode.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=rise_room&page=rise_activity_log
    • > Network (severe)
    wp-content/plugins/rise-hotel-booking/Assets/Dependencies/images/sort_both.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=rise_room&page=rise_activity_log
    • > Network (severe)
    wp-content/plugins/rise-hotel-booking/Assets/Dependencies/images/sort_desc.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #5 (Available rooms to book on that date)
You can look at the official readme.txt

rise-hotel-booking/rise-hotel-booking.php 92% from 13 tests

The entry point to "Rise Hotel Booking" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/rise-hotel-booking/PaymentGateways/stripe/data/ca-certificates.crt
49,496 lines of code in 678 files:
LanguageFilesBlank linesComment linesLines of code
PHP6496,34211,47329,418
JavaScript943499515,060
CSS73251102,116
Markdown474701,344
PO File1298350776
HTML1167461
SVG10092
JSON20091
SQL124081
XML10031
make18023
YAML1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces33
Interfaces12
Traits7
Classes536
▷ Abstract classes112.05%
▷ Concrete classes52597.95%
▷ Final classes00.00%
Methods3,069
▷ Static methods43614.21%
▷ Public methods2,97596.94%
▷ Protected methods361.17%
▷ Private methods581.89%
Functions36
▷ Named functions1027.78%
▷ Anonymous functions2672.22%
Constants833
▷ Global constants40.48%
▷ Class constants82999.52%
▷ Public constants829100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin