10% simple-booking-widget

Code Review | Simple Booking - Widget

WordPress plugin Simple Booking - Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-booking-wi...
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Nov 21, 2022
  • Number of updates: 18
  • Update frequency: every 82.0 days
  • Top authors: roline (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,446 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/simple-booking-widget/simplebooking-widget.php+133
    syntax error, unexpected '}', expecting end of file

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

A check of server-side resources used by Simple Booking - Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.20 ▼14.98
Dashboard /wp-admin3.31 ▲0.0044.82 ▼4.67
Posts /wp-admin/edit.php3.36 ▲0.0049.57 ▲3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.02 ▼7.05
Media Library /wp-admin/upload.php3.23 ▲0.0034.26 ▼1.26

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Booking - Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.71 ▼0.511.66 ▼0.4639.89 ▼5.88
Dashboard /wp-admin2,206 ▲184.86 ▼1.00107.72 ▼1.6341.52 ▼0.63
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.76 ▲3.2836.43 ▲0.14
Add New Post /wp-admin/post-new.php1,542 ▲918.09 ▼4.98656.85 ▼23.8554.34 ▲1.97
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.01101.04 ▼7.6942.99 ▲0.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 50% 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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_data_simple_booking() in wp-content/plugins/simple-booking-widget/form-booking.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_data_simple_booking() in wp-content/plugins/simple-booking-widget/list-offers.php:3
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/simple-booking-widget/simplebooking-widget.php on line 133

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: simple booking, roline system, hotel booking, reservation

simple-booking-widget/simplebooking-widget.php 92% from 13 tests

Analyzing the main PHP file in "Simple Booking - Widget" version 1.1
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-booking-widget.php" instead of "simplebooking-widget.php")

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
There were no executable files found in this plugin390 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31639387
JavaScript1003

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.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin