10% booking-and-rental-manager-for-woocommerce

Code Review | Booking and Rental Manager for Bike | Car | Resort | Appointment | Dress | Equipment - WpRently

WordPress plugin Booking and Rental Manager for Bike | Car | Resort | Appointment | Dress | Equipment - WpRently scored10%from 54 tests.

About plugin

  • Plugin page: booking-and-renta...
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2022
  • Latest release: Nov 6, 2023
  • Number of updates: 52
  • Update frequency: every 9.9 days
  • Top authors: magepeopleteam (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

400+ active /8,698 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-includes/functions.php+650
    unserialize(): Error at offset 358 of 425 bytes

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

An overview of server-side resources used by Booking and Rental Manager for Bike | Car | Resort | Appointment | Dress | Equipment - WpRently
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.87 ▼3.83
Dashboard /wp-admin3.31 ▲0.0043.85 ▼4.28
Posts /wp-admin/edit.php3.36 ▲0.0048.24 ▼10.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.13 ▼21.12
Media Library /wp-admin/upload.php3.23 ▲0.0033.18 ▼1.59

Server storage [IO: ▲4.58MB] [DB: ▲0.11MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Booking and Rental Manager for Bike | Car | Resort | Appointment | Dress | Equipment - WpRently
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.071.76 ▲0.0739.84 ▼3.74
Dashboard /wp-admin2,195 ▲215.58 ▼0.0999.82 ▲2.5046.08 ▲3.05
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0639.61 ▲2.0537.07 ▲3.13
Add New Post /wp-admin/post-new.php1,526 ▼923.22 ▼1.84736.37 ▲85.4851.38 ▼21.49
Media Library /wp-admin/upload.php2,494 ▲1,1004.79 ▲0.53125.34 ▲24.9547.13 ▲4.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 16 options in the database
    • rbfw_basic_payment_settings
    • db_upgraded
    • rbfw_old_inventory_updated
    • rbfw_sample_rent_items
    • rbfw_basic_style_settings
    • rbfw_time_slots
    • rbfw_license_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • rbfw_basic_pdf_settings
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/booking-and-rental-manager-for-woocommerce/templates/rent_list_styles/grid.php:6
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/booking-and-rental-manager-for-woocommerce/support/elementor/elementor-support.php on line 46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/booking-and-rental-manager-for-woocommerce/support/elementor/elementor-support.php:47
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/booking-and-rental-manager-for-woocommerce/support/elementor/elementor-support.php on line 46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/booking-and-rental-manager-for-woocommerce/templates/rent_list_styles/list.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/booking-and-rental-manager-for-woocommerce/support/elementor/elementor-support.php on line 46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #2, #3, #4, #5, #6, #7, #8, #9 in booking-and-rental-manager-for-woocommerce/assets to your readme.txt
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

booking-and-rental-manager-for-woocommerce/rent-manager.php 77% from 13 tests

The entry point to "Booking and Rental Manager for Bike | Car | Resort | Appointment | Dress | Equipment - WpRently" version 1.3.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.3" instead of "3.0.9")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("booking-and-rental-manager-for-woocommerce.php" instead of "rent-manager.php")
  • Plugin Name: A shorter plugin name is better (currently 95 characters long instead of max. 70)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin55,198 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP766,2161,75833,010
CSS153,11146014,879
JavaScript135741752,704
SVG1132,304
XML144201,744
HTML1694557

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,436)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity119.42
▷ Minimum class complexity1.00
▷ Maximum class complexity2,436.00
Average method complexity10.30
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods457
▷ Static methods204.38%
▷ Public methods40287.96%
▷ Protected methods102.19%
▷ Private methods459.85%
Functions136
▷ Named functions13599.26%
▷ Anonymous functions10.74%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
86 PNG files occupy 0.71MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/muff_clock_icon.png0.50KB0.38KB▼ 22.68%
assets/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
admin/css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
admin/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%