84% rentmy-online-rental-shop

Code Review | RentMy Real-Time Rental Management Plugin

WordPress plugin RentMy Real-Time Rental Management Plugin scored84%from 54 tests.

About plugin

  • Plugin page: rentmy-online-ren...
  • Plugin version: 3.16.16
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 6, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 200
  • Update frequency: every 8.2 days
  • Top authors: rentmy (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /11,925 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▲105.54ms] Passed 4 tests

This is a short check of server-side resources used by RentMy Real-Time Rental Management Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.62478.58 ▲430.52
Dashboard /wp-admin3.94 ▲0.6456.92 ▼0.59
Posts /wp-admin/edit.php3.95 ▲0.5945.82 ▼0.31
Add New Post /wp-admin/post-new.php6.52 ▲0.6392.00 ▼7.45
Media Library /wp-admin/upload.php3.86 ▲0.635,514.66 ▲5,476.55
RentMy /wp-admin/options-general.php?page=rentmy4.07171.34

Server storage [IO: ▲2.06MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/rentmy-online-rental-shop/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 100 new files
Database: no new tables, 22 new options
New WordPress options
widget_recent-comments
widget_recent-posts
rentmy.page_url.products_list_with_filter
rentmy.page_url.package_details
rentmy.page_url.products_list
widget_rentmy_category_widget
rentmy.page_url.checkout
widget_rentmy_order_summary_widget
theysaidso_admin_options
rentmy.page_url.customer_login
...

Browser metrics Passed 4 tests

A check of browser resources used by RentMy Real-Time Rental Management Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,306 ▲54518.24 ▲3.84226.75 ▲225.0179.04 ▲34.75
Dashboard /wp-admin2,228 ▲225.88 ▲0.0098.18 ▼18.2769.93 ▲24.36
Posts /wp-admin/edit.php2,119 ▲192.00 ▼0.0534.50 ▼6.7434.11 ▼2.26
Add New Post /wp-admin/post-new.php1,545 ▼921.39 ▲3.18743.12 ▲75.9358.80 ▲1.19
Media Library /wp-admin/upload.php1,413 ▲134.20 ▼0.1995.56 ▼14.3781.59 ▲35.15
RentMy /wp-admin/options-general.php?page=rentmy1,8122.0226.4533.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 22 options in the database
    • rentmy.order
    • widget_recent-posts
    • widget_rentmy_tags_widget
    • rentmy.page_url.product_details
    • widget_rentmy_category_widget
    • widget_recent-comments
    • rentmy.page_url.checkout
    • widget_rentmy_minicart_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rentmy-online-rental-shop/includes/class-rentmy-tags-widgets.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-mini-cart.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-cart-details.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-grid.php:86
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-order-details.php:283
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-product-details-slider.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rentmy-online-rental-shop/includes/class-rentmy-order-summary-widgets.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-customer-reset-password.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rentmy-online-rental-shop/short-codes/rentmy-search.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rentmy-online-rental-shop/includes/class-rentmy-search-widgets.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: inventory management, booking system, rental, rental software, asset management...

rentmy-online-rental-shop/rentmy.php 92% from 13 tests

The main file in "RentMy Real-Time Rental Management Plugin" v. 3.16.16 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rentmy-online-rental-shop.php" instead of "rentmy.php")

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
There were no executable files found in this plugin29,041 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP491,9311,28911,892
JavaScript81,0735836,456
CSS6961566,029
Vuejs Component174383924,664

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity26.53
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods168
▷ Static methods52.98%
▷ Public methods16698.81%
▷ Protected methods00.00%
▷ Private methods21.19%
Functions74
▷ Named functions7297.30%
▷ Anonymous functions22.70%
Constants14
▷ Global constants14100.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
16 PNG files occupy 0.39MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png6.73KB3.58KB▼ 46.76%
assets/images/card.png3.50KB3.41KB▼ 2.81%
assets/images/truck.png15.92KB6.25KB▼ 60.76%
assets/images/delivery.png10.69KB7.24KB▼ 32.23%
assets/images/shipping-bold.png5.88KB1.47KB▼ 74.92%