78% redforts-oscar-hotel-booking

Code Review | Redforts Oscar Hotel Booking

WordPress plugin Redforts Oscar Hotel Booking scored78%from 54 tests.

About plugin

  • Plugin page: redforts-oscar-ho...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.7.0
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Jul 28, 2017
  • Number of updates: 13
  • Update frequency: every 41.2 days
  • Top authors: redforts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.30ms] Passed 4 tests

Analyzing server-side resources used by Redforts Oscar Hotel Booking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.30 ▼0.86
Dashboard /wp-admin3.46 ▲0.1550.53 ▼1.45
Posts /wp-admin/edit.php3.57 ▲0.2151.64 ▲1.85
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.92 ▼11.43
Media Library /wp-admin/upload.php3.38 ▲0.1538.30 ▲0.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
widget_rohb_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redforts Oscar Hotel Booking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.37 ▲0.431.74 ▼0.2741.15 ▼3.22
Dashboard /wp-admin2,224 ▲445.74 ▲0.1689.58 ▼3.2984.73 ▲42.69
Posts /wp-admin/edit.php2,134 ▲342.28 ▲0.3236.62 ▼0.1134.78 ▼3.98
Add New Post /wp-admin/post-new.php1,552 ▲2623.09 ▼0.10724.97 ▲29.0235.87 ▼16.06
Media Library /wp-admin/upload.php1,435 ▲354.41 ▲0.2796.97 ▼9.6166.02 ▲15.56

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_rohb_widget
    • 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
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/redforts-oscar-hotel-booking/includes/static/main-help-en.php
    • > /wp-content/plugins/redforts-oscar-hotel-booking/includes/static/main-help-es.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/redforts-oscar-hotel-booking/includes/static/widget-help-en.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/redforts-oscar-hotel-booking/includes/static/widget-help-es.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/redforts-oscar-hotel-booking/includes/static/shortcode-help-en.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/redforts-oscar-hotel-booking/includes/ROHB-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/redforts-oscar-hotel-booking/includes/static/shortcode-help-es.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/redforts-oscar-hotel-booking/includes/ROHB-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

redforts-oscar-hotel-booking/redforts-oscar-hotel-booking.php 85% from 13 tests

The main PHP file in "Redforts Oscar Hotel Booking" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,649 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP10202251799
PO File9369334796
CSS210349
JavaScript1005

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.30
Average class complexity24.00
▷ Minimum class complexity20.00
▷ Maximum class complexity27.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/redforts-icon.png0.93KB0.73KB▼ 21.43%
assets/images/redforts-logo.png8.18KB4.27KB▼ 47.78%
assets/images/date-icon.png1.03KB0.12KB▼ 88.22%