78% maxbooking-booking-widget

Code Review | MaxBooking Booking Widget

WordPress plugin MaxBooking Booking Widget scored78%from 54 tests.

About plugin

  • Plugin page: maxbooking-bookin...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Nov 28, 2017
  • Number of updates: 8
  • Update frequency: every 31.6 days
  • Top authors: maxbooking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /749 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼9.22ms] Passed 4 tests

A check of server-side resources used by MaxBooking Booking Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1736.53 ▼5.29
Dashboard /wp-admin3.45 ▲0.1147.79 ▼14.10
Posts /wp-admin/edit.php3.57 ▲0.2149.09 ▲2.22
Add New Post /wp-admin/post-new.php6.03 ▲0.1583.00 ▼16.27
Media Library /wp-admin/upload.php3.38 ▲0.1536.34 ▼1.21

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 68 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_maxbooking_booking_widget_property
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_maxbooking_booking_widget_property_group
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MaxBooking Booking Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.64 ▼0.577.01 ▲4.9440.71 ▼0.13
Dashboard /wp-admin2,206 ▲185.83 ▲0.7297.90 ▼11.0339.98 ▼0.59
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0339.08 ▲4.4335.48 ▲0.90
Add New Post /wp-admin/post-new.php1,520 ▼223.24 ▲0.26641.61 ▼26.6651.75 ▼7.47
Media Library /wp-admin/upload.php1,391 ▲34.29 ▲0.01101.51 ▼18.7041.75 ▼7.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_maxbooking_booking_widget_property
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_maxbooking_booking_widget_property_group

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-property-group-admin.php
    • > /wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-property-admin.php
    • > /wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-common-fields.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Maxbooking_Booking_Widget_Widget' not found in wp-content/plugins/maxbooking-booking-widget/widgets/class-maxbooking-booking-widget-property-widget.php:19
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-property-group-public.php on line 1
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/maxbooking-booking-widget/widgets/class-maxbooking-booking-widget-widget.php:19
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-admin-fields.php on line 1
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/maxbooking-booking-widget/widgets/partials/maxbooking-booking-widget-property-group-public.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can look at the official readme.txt

maxbooking-booking-widget/maxbooking-booking-widget.php Passed 13 tests

"MaxBooking Booking Widget" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
43 characters long description:
The Official MaxBooking.com Booking Widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,342 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP19122609607
PO File191346554
CSS4010103
JavaScript211578

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.90
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods39
▷ Static methods615.38%
▷ Public methods2666.67%
▷ Protected methods820.51%
▷ Private methods512.82%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected