68% softinn-booking-engine

Code Review | Softinn Hotel Booking Engine

WordPress plugin Softinn Hotel Booking Engine scored 68% from 54 tests.

About plugin

  • Plugin page: softinn-booking-e...
  • Plugin version: 2.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.4.1
  • WordPress version: 5.8.1
  • First release: Apr 8, 2019
  • Latest release: May 11, 2020
  • Number of updates: 33
  • Update frequency: every 12.2 days
  • Top authors: softinn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 543 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.55ms] Passed 4 tests

A check of server-side resources used by Softinn Hotel Booking Engine
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0639.18 ▲1.84
Dashboard /wp-admin3.11 ▲0.0645.92 ▼3.45
Posts /wp-admin/edit.php3.20 ▲0.0941.24 ▼1.93
Add New Post /wp-admin/post-new.php5.47 ▲0.04100.73 ▼555.01
Media Library /wp-admin/upload.php3.06 ▲0.0633.11 ▼5.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 5 new options
New WordPress options
softinn_theme_color
softinn_admin_nonce
softinn_hotel_id
softinn_theme_color_temp
widget_softinn_calendarwidget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Softinn Hotel Booking Engine
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,885 ▲28917.87 ▲2.0222.32 ▲15.0753.23 ▲0.39
Dashboard /wp-admin3,013 ▲826.71 ▲0.79140.92 ▼16.10114.62 ▼7.28
Posts /wp-admin/edit.php2,807 ▲682.75 ▲0.0668.45 ▼1.69123.36 ▲20.80
Add New Post /wp-admin/post-new.php1,714 ▲3118.30 ▼0.45390.46 ▼9.97115.14 ▼0.87
Media Library /wp-admin/upload.php1,797 ▼105.34 ▲0.33143.02 ▼0.69140.84 ▲14.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'SoftinnBE' does not have a method 'deactivate'
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_softinn_calendarwidget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/softinn-booking-engine/softinn-booking-engine.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_WIDGET' not found in wp-content/plugins/softinn-booking-engine/inc/softinn-calendarwidget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/softinn-booking-engine/templates/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

softinn-booking-engine/softinn-booking-engine.php 92% from 13 tests

This is the main PHP file of "Softinn Hotel Booking Engine" version 2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 194 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
There were no executable files found in this plugin405 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP74494322
JavaScript663369
CSS311814

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.51MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png26.45KB7.01KB▼ 73.48%
assets/images/ui-icons_555555_256x240.png3.20KB3.50KB0.00%
wordpress assets/banner-1544x500.png256.47KB80.08KB▼ 68.78%
wordpress assets/screenshot-3.png92.62KB32.37KB▼ 65.05%
wordpress assets/icon-128x128.png19.82KB3.57KB▼ 81.96%