83% booking-and-rental-system-woocommerce

Code Review | RnB Lite - WooCommerce Booking and Rental System

WordPress plugin RnB Lite - WooCommerce Booking and Rental System scored83%from 54 tests.

About plugin

  • Plugin page: booking-and-renta...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2016
  • Latest release: Aug 17, 2023
  • Number of updates: 115
  • Update frequency: every 23.7 days
  • Top authors: redq (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /30,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by RnB Lite - WooCommerce Booking and Rental System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.39 ▼12.71
Dashboard /wp-admin3.39 ▲0.0848.45 ▼2.39
Posts /wp-admin/edit.php3.50 ▲0.1550.81 ▲0.91
Add New Post /wp-admin/post-new.php5.97 ▲0.0898.06 ▲2.34
Media Library /wp-admin/upload.php3.31 ▲0.0837.20 ▲2.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by RnB Lite - WooCommerce Booking and Rental System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.68 ▼0.521.80 ▼0.3542.31 ▼1.57
Dashboard /wp-admin2,214 ▲264.85 ▼0.04104.51 ▼13.1737.82 ▼6.47
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0442.10 ▲5.4237.16 ▲1.98
Add New Post /wp-admin/post-new.php1,547 ▲1123.28 ▲0.14636.47 ▼13.2457.40 ▲5.02
Media Library /wp-admin/upload.php1,399 ▲84.22 ▼0.0198.30 ▼7.9345.77 ▲0.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Admin/views/html-own-availability.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Admin/views/admin-rnb-addons.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Admin/views/html-additional-feature-meta.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Product' not found in wp-content/plugins/booking-and-rental-system-woocommerce/includes/class-rnb-lite-redq_rental.php:6
    • > PHP Fatal error
      Trait 'RnbLite\\Traits\\Assets_Trait' not found in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Assets.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Admin/views/html-attribute-info-meta.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/views/pricing-info.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/booking-and-rental-system-woocommerce/includes/Admin/views/html-attribute-info-meta.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% 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
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

booking-and-rental-system-woocommerce/rnb-lite.php 85% from 13 tests

The entry point to "RnB Lite - WooCommerce Booking and Rental System" version 2.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("booking-and-rental-system-woocommerce.php" instead of "rnb-lite.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected23,440 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
CSS81,7801036,331
JavaScript126643955,782
PHP293727261,998
JSON20030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.80
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods90
▷ Static methods2224.44%
▷ Public methods8796.67%
▷ Protected methods00.00%
▷ Private methods33.33%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%