84% inspirelabs-bookings

Code Review | iLabs Booking WooCommerce - apartments, boats, cars

WordPress plugin iLabs Booking WooCommerce - apartments, boats, cars scored84%from 54 tests.

About plugin

  • Plugin page: inspirelabs-bookings
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2022
  • Latest release: Feb 22, 2023
  • Number of updates: 7
  • Update frequency: every 43.9 days
  • Top authors: inspirelabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /820 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.39MB] [CPU: ▼1.18ms] Passed 4 tests

An overview of server-side resources used by iLabs Booking WooCommerce - apartments, boats, cars
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4243.46 ▲6.51
Dashboard /wp-admin3.71 ▲0.3650.94 ▼8.26
Posts /wp-admin/edit.php3.77 ▲0.4048.75 ▲3.16
Add New Post /wp-admin/post-new.php6.30 ▲0.4096.17 ▼3.05
Media Library /wp-admin/upload.php3.64 ▲0.4037.70 ▲3.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 275 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
plugin_activation_inspirelabs-bookings/inspirelabs-bookings.php

Browser metrics Passed 4 tests

An overview of browser requirements for iLabs Booking WooCommerce - apartments, boats, cars
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.14 ▼0.391.86 ▲0.3846.65 ▲5.64
Dashboard /wp-admin2,198 ▲185.62 ▼0.0393.67 ▲7.6144.27 ▲2.45
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0535.63 ▲2.1231.43 ▼4.60
Add New Post /wp-admin/post-new.php1,543 ▲1218.26 ▼4.63606.62 ▼34.5458.90 ▼6.30
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0095.14 ▼20.5440.14 ▼7.98

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • plugin_activation_inspirelabs-bookings/inspirelabs-bookings.php
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 115× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\WPDesk_Translatable' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/wpdesk/wp-builder/src/Plugin/SlimPlugin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'BookingsVendor\\WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' not found in wp-content/plugins/inspirelabs-bookings/src/Plugin/Plugin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'BookingsVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/inspirelabs-bookings/src/Plugin/Admin/WC_Order/order_details_template.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Logs/LibraryInfoProcessor.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\WPDesk\\PluginBuilder\\Plugin\\HookablePluginDependant' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/AjaxHandler.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'BookingsVendor\\Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'BookingsVendor\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/inspirelabs-bookings/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: coaching timetable, booking, apartment rent, event management, car rental

inspirelabs-bookings/inspirelabs-bookings.php 92% from 13 tests

"iLabs Booking WooCommerce - apartments, boats, cars" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20,431 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131,1397,89211,717
JavaScript118094933,475
PO File109271,0522,228
CSS499821,484
Sass77628913
JSON1210536
Markdown422078

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces39
Interfaces29
Traits10
Classes161
▷ Abstract classes106.21%
▷ Concrete classes15193.79%
▷ Final classes10.66%
Methods1,084
▷ Static methods827.56%
▷ Public methods77971.86%
▷ Protected methods15414.21%
▷ Private methods15113.93%
Functions79
▷ Named functions1518.99%
▷ Anonymous functions6481.01%
Constants131
▷ Global constants10.76%
▷ Class constants13099.24%
▷ Public constants130100.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
No PNG files were detected