56% rentsyst

Code Review | RentSyst - CRM solution for fleet management

WordPress plugin RentSyst - CRM solution for fleet management scored56%from 54 tests.

About plugin

  • Plugin page: rentsyst
  • Plugin version: 2.0.14
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 144
  • Update frequency: every 9.4 days
  • Top authors: dimafreund (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /6,498 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.14MB] [CPU: ▲68.58ms] Passed 4 tests

An overview of server-side resources used by RentSyst - CRM solution for fleet management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.62122.72 ▲78.81
Dashboard /wp-admin2.89 ▼0.46141.04 ▲77.18
Posts /wp-admin/edit.php2.89 ▼0.47142.32 ▲91.83
Add New Post /wp-admin/post-new.php2.89 ▼3.00125.69 ▲26.50
Media Library /wp-admin/upload.php2.89 ▼0.34178.47 ▲144.45
Catalog Options /wp-admin/admin.php?page=catalog-options2.89147.05
Rentsyst /wp-admin/admin.php?page=rentsyst2.89120.34
Design /wp-admin/admin.php?page=rentsyst-design2.89161.72

Server storage [IO: ▲25.56MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Try to limit filesystem usage to 25MB (currently using 25.56MB)
Filesystem: 403 new files
Database: no new tables, 10 new options
New WordPress options
widget_rentsyst_formsearch
widget_theysaidso_widget
db_upgraded
rentsyst_confirmation_page_id
theysaidso_admin_options
widget_rentstyst
widget_recent-comments
widget_recent-posts
widget_rentstyst_filter
can_compress_scripts

Browser metrics Passed 4 tests

RentSyst - CRM solution for fleet management: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6814.39 ▲0.121.60 ▼0.1139.71 ▼5.59
Dashboard /wp-admin2,238 ▲615.63 ▼0.1193.48 ▼4.9455.86 ▲12.34
Posts /wp-admin/edit.php2,149 ▲461.97 ▼0.0440.16 ▲0.3350.25 ▲19.13
Add New Post /wp-admin/post-new.php1,696 ▲17021.01 ▼2.08659.42 ▲53.4554.07 ▼3.60
Media Library /wp-admin/upload.php1,443 ▲404.20 ▼0.03112.77 ▲16.8361.13 ▲15.48
Catalog Options /wp-admin/admin.php?page=catalog-options1,0212.0127.9145.94
Rentsyst /wp-admin/admin.php?page=rentsyst1,1562.1729.1135.30
Design /wp-admin/admin.php?page=rentsyst-design1,05713.88417.47110.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/rentsyst/includes/RS_Company.php+111
    Trying to get property 'withCoupon' of non-object
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_rentstyst_filter
    • widget_rentsyst_formsearch
    • widget_rentstyst
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rentsyst-design
    • > Notice in wp-content/plugins/rentsyst/includes/RS_Company.php+111
    Trying to get property 'withCoupon' of non-object

SRP 0% 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/rentsyst/includes/templates/catalog.php
    • > /wp-content/plugins/rentsyst/includes/templates/payment_error.php
    • > /wp-content/plugins/rentsyst/includes/templates/single.php
    • > /wp-content/plugins/rentsyst/includes/templates/payment_success.php
  • 132× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_RENTSYST_PLUGIN_DIR - assumed 'WP_RENTSYST_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rentsyst/site/partials/booking-button.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'rentsyst\\admin\\controllers\\Rentsyst_BaseController' not found in wp-content/plugins/rentsyst/admin/controllers/Rentsyst_DesignV2Controller.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rentsyst/includes/blocks/index.php:3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/rentsyst/site/partials/booking-v2.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rentsyst/site/partials/filter.php:14
    • > PHP Warning
      require_once(WP_RENTSYST_PLUGIN_DIR/includes/RS_Company.php): failed to open stream: No such file or directory in wp-content/plugins/rentsyst/includes/shortcodes/company.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function getId() on null in wp-content/plugins/rentsyst/public/templates/single-vehicle.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_RENTSYST_PLUGIN_DIR/admin/components/Rentsyst_OrderListTable.php' (include_path='.:/usr/share/php') in wp-content/plugins/rentsyst/admin/pages/orders.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_RENTSYST_PLUGIN_DIR/includes/Rentsyst_CatalogFilter.php' (include_path='.:/usr/share/php') in wp-content/plugins/rentsyst/site/templates/rentsyst-catalog.php on line 5
    • > PHP Warning
      Use of undefined constant WP_RENTSYST_PLUGIN_DIR - assumed 'WP_RENTSYST_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rentsyst/admin/controllers/Rentsyst_OrdersController.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=rentsyst-design
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyAddwFzEu83xzv_3kQjwLOrK3d35bmiOKg&libraries=places&ver=2.0.14 240:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #10, #2, #4, #6, #8 in rentsyst/assets to your readme.txt
  • Screenshots: Screenshot #9 (10.) image not found
You can take inspiration from this readme.txt

rentsyst/rentsyst.php Passed 13 tests

This is the main PHP file of "RentSyst - CRM solution for fleet management" version 2.0.14, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
Pocket office for a car rental business.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected39,572 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript644,1034,27317,959
CSS221,0074510,169
PHP971,3791,2968,713
SVG8031,587
HTML391879
JSON800263
Markdown1102

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.60
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes00.00%
Methods347
▷ Static methods9126.22%
▷ Public methods29484.73%
▷ Protected methods51.44%
▷ Private methods4813.83%
Functions62
▷ Named functions1117.74%
▷ Anonymous functions5182.26%
Constants32
▷ Global constants515.62%
▷ Class constants2784.38%
▷ Public constants27100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.67MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources-v2/static/media/rentsyst-logo.cc8bc9a55ba9af1eaa67.png26.52KB11.65KB▼ 56.08%
resources-v2/rentsyst-logo.png26.52KB11.65KB▼ 56.08%
resources-v1/tinymce/plugins/help/img/logo.png12.90KB7.62KB▼ 40.95%
resources/tinymce/plugins/help/img/logo.png12.90KB7.62KB▼ 40.95%
site/img/icon-close.png0.22KB0.26KB0.00%