84% parkingpro-booking-widgets

Code Review | ParkingPro Booking Widgets

WordPress plugin ParkingPro Booking Widgets scored84%from 54 tests.

About plugin

  • Plugin page: parkingpro-bookin...
  • Plugin version: 1.2.44
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2019
  • Latest release: Nov 27, 2023
  • Number of updates: 50
  • Update frequency: every 33.5 days
  • Top authors: parkingpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.32MB] [CPU: ▼5.43ms] Passed 4 tests

A check of server-side resources used by ParkingPro Booking Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3337.37 ▼2.80
Dashboard /wp-admin3.63 ▲0.2849.11 ▼12.58
Posts /wp-admin/edit.php3.75 ▲0.3953.29 ▲3.55
Add New Post /wp-admin/post-new.php6.24 ▲0.3495.04 ▼9.01
Media Library /wp-admin/upload.php3.56 ▲0.3237.01 ▲2.69

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_parkingpro_booking_widgets_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

ParkingPro Booking Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲24213.94 ▼0.3310.23 ▲8.4836.23 ▼8.44
Dashboard /wp-admin2,259 ▲825.70 ▲0.0494.97 ▼6.4140.59 ▼4.51
Posts /wp-admin/edit.php2,169 ▲662.28 ▲0.2844.48 ▲5.7634.11 ▼1.84
Add New Post /wp-admin/post-new.php1,559 ▲1423.16 ▼2.06664.56 ▲11.5336.61 ▼22.89
Media Library /wp-admin/upload.php1,467 ▲674.39 ▲0.19100.52 ▲3.6941.69 ▼0.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_parkingpro_booking_widgets_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_colors_button_hover_text in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 126
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 139
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_remember_widget_fields in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 23
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_colors_button_background in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 75
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_colors_border in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_timezone_string() in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-thank-you-display.php:17
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_display_services in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 139
    • > PHP Fatal error
      Uncaught Error: Class 'NumberFormatter' not found in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-product-selection-display.php:17
    • > PHP Notice
      Undefined variable: parkingpro_booking_widgets_size in wp-content/plugins/parkingpro-booking-widgets/public/partials/parkingpro-booking-widgets-public-display.php on line 141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/parkingpro-booking-widgets/admin/partials/parkingpro-booking-widgets-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: parking, booking, widget, parkingpro

parkingpro-booking-widgets/parkingpro-booking-widgets.php Passed 13 tests

Analyzing the main PHP file in "ParkingPro Booking Widgets" version 1.2.44
92 characters long description:
ParkingPro Booking Widgets plugin: easily add a booking widget or shortcode to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected5,644 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP156367262,426
JavaScript486331,424
CSS4169221,112
PO File2282424682

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity33.62
▷ Minimum class complexity1.00
▷ Maximum class complexity234.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4387.76%
▷ Protected methods00.00%
▷ Private methods612.24%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin