63% vikrentcar

Code Review | VikRentCar Car Rental Management System

WordPress plugin VikRentCar Car Rental Management System scored 63% from 54 tests.

About plugin

  • Plugin page: vikrentcar
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 29, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 72
  • Update frequency: every 18.8 days
  • Top authors: e4jvikwp (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

3,000+ active / 31,709 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲3.95MB] [CPU: ▲21.76ms] Passed 4 tests

A check of server-side resources used by VikRentCar Car Rental Management System
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.92 ▲3.4659.90 ▲20.06
Dashboard /wp-admin7.46 ▲4.1565.69 ▲19.18
Posts /wp-admin/edit.php7.51 ▲4.1571.03 ▲18.71
Add New Post /wp-admin/post-new.php10.01 ▲4.12130.44 ▲45.86
Media Library /wp-admin/upload.php7.31 ▲4.0860.62 ▲29.07

Server storage [IO: ▲15.27MB] [DB: ▲0.04MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 1,308 new files
Database: 36 new tables, 14 new options
New tables
wp_vikrentcar_gpayments
wp_vikrentcar_hourscharges
wp_vikrentcar_condtexts
wp_vikrentcar_cronjobs
wp_vikrentcar_oohfees
wp_vikrentcar_orders
wp_vikrentcar_translations
wp_vikrentcar_oohfees_locxref
wp_vikrentcar_busy
wp_vikrentcar_wpshortcodes
...
New WordPress options
widget_theysaidso_widget
vikrentcar_changelog
db_upgraded
widget_mod_vikrentcar_search
vikrentcar_software_version
vikrentcar_license_key
vikrentcar_license_expdate
widget_mod_vikrentcar_cars
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by VikRentCar Car Rental Management System
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19814.09 ▼0.146.55 ▲4.7738.58 ▼3.33
Dashboard /wp-admin2,242 ▲514.96 ▲0.09109.13 ▲9.8237.54 ▼2.79
Posts /wp-admin/edit.php2,125 ▲362.22 ▲0.2038.40 ▲3.4834.38 ▲2.94
Add New Post /wp-admin/post-new.php6,414 ▲4,88524.45 ▲1.36908.04 ▲312.0154.51 ▲1.25
Media Library /wp-admin/upload.php1,418 ▲304.25 ▲0.0992.06 ▼5.0043.44 ▼2.67

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
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_vikrentcar_cars_icals
    • wp_vikrentcar_restrictions
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_mod_vikrentcar_search
    • widget_mod_vikrentcar_currencyconverter
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_mod_vikrentcar_cars
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 480× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/vikrentcar/libraries/adapter/user/user.php
    • > /wp-content/plugins/vikrentcar/libraries/adapter/application/route.php
    • > /wp-content/plugins/vikrentcar/libraries/html/changelog/section/close.php
    • > /wp-content/plugins/vikrentcar/libraries/adapter/html/classes/access.php
    • > /wp-content/plugins/vikrentcar/libraries/adapter/acl/access.php
    • > /wp-content/plugins/vikrentcar/admin/helpers/conditional_rule.php
    • > /wp-content/plugins/vikrentcar/site/helpers/checkin_pdf_tmpl.php
    • > /wp-content/plugins/vikrentcar/libraries/adapter/toolbar/button/link.php
    • > /wp-content/plugins/vikrentcar/libraries/update/manager.php
    • > /wp-content/plugins/vikrentcar/libraries/system/mce.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: rent, car rental, hire, rent a car, rental management...

vikrentcar/vikrentcar.php Passed 13 tests

Analyzing the main PHP file in "VikRentCar Car Rental Management System" version 1.3.1
38 characters long description:
Robust Car Rental Management Software.

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/vikrentcar/site/helpers/tcpdf/tcpdf.crt
191,900 lines of code in 643 files:
LanguageFilesBlank linesComment linesLines of code
PHP54412,71543,968130,462
CSS382,47032226,368
JavaScript243,5591,97216,635
PO File23,5694,1999,333
SVG60126,660
SQL6512869
Markdown34530820
XML14402706
JSON10038
HTML5009

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 5,383)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 1,575)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity51.39
▷ Minimum class complexity1.00
▷ Maximum class complexity5,383.00
Average method complexity7.36
▷ Minimum method complexity1.00
▷ Maximum method complexity1,575.00
Code structure
Namespaces0
Interfaces8
Traits5
Classes345
▷ Abstract classes5315.36%
▷ Concrete classes29284.64%
▷ Final classes82.74%
Methods2,879
▷ Static methods60220.91%
▷ Public methods2,23877.74%
▷ Protected methods57519.97%
▷ Private methods662.29%
Functions98
▷ Named functions55.10%
▷ Anonymous functions9394.90%
Constants188
▷ Global constants16989.89%
▷ Class constants1910.11%
▷ Public constants19100.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
435 PNG files occupy 1.31MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/resources/countries/PER.png0.14KB0.12KB▼ 13.10%
admin/resources/countries/TCA.png0.95KB0.96KB0.00%
admin/resources/images/hourly_tab.png1.89KB2.00KB0.00%
admin/resources/plus-btn.png50.01KB0.27KB▼ 99.45%
admin/resources/countries/CIV.png0.14KB0.13KB▼ 12.16%