78% pixelbeds-channel-manager-booking-engine

Code Review | PixelBeds Channel Manager and Hotel Booking Engine

WordPress plugin PixelBeds Channel Manager and Hotel Booking Engine scored78%from 54 tests.

About plugin

  • Plugin page: pixelbeds-channel...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2017
  • Latest release: Jun 4, 2018
  • Number of updates: 11
  • Update frequency: every 21.5 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,054 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.74ms] Passed 4 tests

This is a short check of server-side resources used by PixelBeds Channel Manager and Hotel Booking Engine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.44 ▲0.12
Dashboard /wp-admin3.34 ▲0.0455.94 ▼6.08
Posts /wp-admin/edit.php3.46 ▲0.1050.05 ▼5.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.25 ▼11.75
Media Library /wp-admin/upload.php3.26 ▲0.0439.41 ▼0.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 248 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

PixelBeds Channel Manager and Hotel Booking Engine: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4413.94 ▼0.411.74 ▼0.1444.66 ▲0.78
Dashboard /wp-admin2,211 ▲315.63 ▼0.0187.11 ▼11.8839.40 ▼4.52
Posts /wp-admin/edit.php2,113 ▲131.99 ▲0.0433.42 ▼6.4735.39 ▲0.83
Add New Post /wp-admin/post-new.php1,539 ▲1123.10 ▼0.01640.69 ▼58.6846.62 ▼9.44
Media Library /wp-admin/upload.php1,416 ▲164.30 ▲0.1099.26 ▼9.1746.91 ▲0.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php
  • 116× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 170
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 168
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 114
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 154
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 122
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 85
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 91
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 124
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 164
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pixelbeds-channel-manager-booking-engine/templates/og_booking_widget.php on line 169

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: These screenshots require images: #7 (Sample design 6), #8 (Sample design 7), #9 (Sample design 8)
The official readme.txt is a good inspiration

pixelbeds-channel-manager-booking-engine/og-booking-widget.php 92% from 13 tests

The entry point to "PixelBeds Channel Manager and Hotel Booking Engine" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pixelbeds-channel-manager-booking-engine.php" instead of "og-booking-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
No dangerous file extensions were detected27,824 lines of code in 224 files:
LanguageFilesBlank linesComment linesLines of code
CSS182010112,049
JavaScript1361,0921,2585,771
PHP401853473,519
SVG2002,959
Sass1434341,768
LESS1434441,758

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods13
▷ Static methods00.00%
▷ Public methods861.54%
▷ Protected methods00.00%
▷ Private methods538.46%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin