83% hotelrunner

Code Review | HotelRunner Booking Widget

WordPress plugin HotelRunner Booking Widget scored83%from 54 tests.

About plugin

  • Plugin page: hotelrunner
  • Plugin version: 1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Nov 29, 2019
  • Latest release: Jan 25, 2021
  • Number of updates: 29
  • Update frequency: every 14.6 days
  • Top authors: melihozsecgin (72.41%)integrationshotelrunner (31.03%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.39ms] Passed 4 tests

A check of server-side resources used by HotelRunner Booking Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.14 ▲1.16
Dashboard /wp-admin3.32 ▼0.0352.40 ▼15.34
Posts /wp-admin/edit.php3.37 ▲0.0147.15 ▼3.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.49 ▼20.09
Media Library /wp-admin/upload.php3.24 ▲0.0140.20 ▲4.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for HotelRunner Booking Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.81 ▼0.6113.73 ▲11.9835.56 ▼6.18
Dashboard /wp-admin2,204 ▲275.63 ▼0.0687.96 ▼4.8177.24 ▲37.18
Posts /wp-admin/edit.php2,121 ▲182.04 ▲0.0234.97 ▼4.3934.40 ▼3.28
Add New Post /wp-admin/post-new.php1,543 ▲1523.11 ▲0.03751.24 ▲59.3360.61 ▲9.91
Media Library /wp-admin/upload.php1,412 ▲94.24 ▲0.09102.64 ▼2.7165.66 ▲19.05

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 WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_hotelrunner_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant HOTELRUNNER_PATH - assumed 'HOTELRUNNER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hotelrunner/inc/init.php on line 9
    • > PHP Warning
      require(HOTELRUNNER_PATHinc/hotelrunner-settings.php): failed to open stream: No such file or directory in wp-content/plugins/hotelrunner/inc/init.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hotelrunner/inc/hotelrunner-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hotelrunner/inc/hotelrunner-class.php:5
    • > PHP Fatal error
      require(): Failed opening required 'HOTELRUNNER_PATHinc/hotelrunner-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/hotelrunner/inc/init.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in hotelrunner/assets to your readme.txt
You can take inspiration from this readme.txt

hotelrunner/hotelrunner-widget.php 92% from 13 tests

This is the main PHP file of "HotelRunner Booking Widget" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hotelrunner.php" instead of "hotelrunner-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,015 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS4228312,556
PHP587721,119
JavaScript230340

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity7.75
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.57MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot_1.png12.35KB6.25KB▼ 49.43%
assets/img/hotelrunner-icon2.png0.83KB0.81KB▼ 1.54%
assets/img/hotelrunner-icon3.png0.83KB0.81KB▼ 1.54%
assets/Screenshot_10.png10.17KB5.48KB▼ 46.17%
assets/Screenshot_2.png46.86KB22.07KB▼ 52.90%