74% vikrentitems

Code Review | VikRentItems Flexible Rental Management System

WordPress plugin VikRentItems Flexible Rental Management System scored74%from 54 tests.

About plugin

  • Plugin page: vikrentitems
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 14, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 47
  • Update frequency: every 21.3 days
  • Top authors: e4jvikwp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /7,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.41MB] [CPU: ▲13.45ms] Passed 4 tests

A check of server-side resources used by VikRentItems Flexible Rental Management System
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.48 ▲3.0256.88 ▲19.48
Dashboard /wp-admin6.83 ▲3.5369.66 ▲23.77
Posts /wp-admin/edit.php6.94 ▲3.5960.79 ▲17.21
Add New Post /wp-admin/post-new.php9.50 ▲3.6198.27 ▼6.65
Media Library /wp-admin/upload.php6.75 ▲3.5262.08 ▲24.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 956 new files
Database: 35 new tables, 14 new options
New tables
wp_vikrentitems_caratteristiche
wp_vikrentitems_customers_orders
wp_vikrentitems_relations
wp_vikrentitems_tmplock
wp_vikrentitems_texts
wp_vikrentitems_busy
wp_vikrentitems_dispcost
wp_vikrentitems_discountsquants
wp_vikrentitems_categories
wp_vikrentitems_iva
...
New WordPress options
vikrentitems_software_version
widget_recent-comments
widget_recent-posts
widget_mod_vikrentitems_items
vikrentitems_changelog
db_upgraded
vikrentitems_license_hash
vikrentitems_license_expdate
widget_theysaidso_widget
widget_mod_vikrentitems_summary
...

Browser metrics Passed 4 tests

An overview of browser requirements for VikRentItems Flexible Rental Management System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.58 ▼0.769.56 ▲7.9145.07 ▲4.03
Dashboard /wp-admin2,228 ▲515.67 ▲0.0189.63 ▲0.8039.01 ▲1.53
Posts /wp-admin/edit.php2,112 ▲92.19 ▲0.1936.86 ▼0.0835.48 ▲3.28
Add New Post /wp-admin/post-new.php6,202 ▲4,67425.02 ▲1.76839.68 ▲134.2787.51 ▲17.39
Media Library /wp-admin/upload.php1,436 ▲394.30 ▲0.13102.68 ▼5.0441.99 ▼3.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • widget_mod_vikrentitems_summary
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_mod_vikrentitems_search
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_mod_vikrentitems_items

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 425× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/vikrentitems/site/helpers/tcpdf/fonts/helvetica.php
    • > /wp-content/plugins/vikrentitems/libraries/update/changelog.php
    • > /wp-content/plugins/vikrentitems/site/helpers/tcpdf/fonts/pdfahelveticabi.php
    • > /wp-content/plugins/vikrentitems/admin/views/iva/tmpl/default.php
    • > /wp-content/plugins/vikrentitems/admin/views/shortcode/view.html.php
    • > /wp-content/plugins/vikrentitems/modules/mod_vikrentitems_summary/helper.php
    • > /wp-content/plugins/vikrentitems/site/helpers/tcpdf/config/lang/glg.php
    • > /wp-content/plugins/vikrentitems/admin/views/managediscount/tmpl/default.php
    • > /wp-content/plugins/vikrentitems/libraries/adapter/application/version.php
    • > /wp-content/plugins/vikrentitems/site/helpers/tcpdf/config/lang/mkd.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
10 plugin tags: hire, items rental, storage rent, bikes, rent...

vikrentitems/vikrentitems.php Passed 13 tests

The main PHP file in "VikRentItems Flexible Rental Management System" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
Multi-purpose items rental system.

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/vikrentitems/site/helpers/tcpdf/tcpdf.crt
143,356 lines of code in 487 files:
LanguageFilesBlank linesComment linesLines of code
PHP4248,82532,039109,458
CSS2534219714,892
SVG4088,381
JavaScript101,4258855,003
PO File11,4141,6533,680
SQL2422772
Markdown34110746
XML13262378
JSON10038
HTML4008

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 5,381)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 1,257)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity63.68
▷ Minimum class complexity1.00
▷ Maximum class complexity5,381.00
Average method complexity8.07
▷ Minimum method complexity1.00
▷ Maximum method complexity1,257.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes248
▷ Abstract classes3815.32%
▷ Concrete classes21084.68%
▷ Final classes41.90%
Methods2,230
▷ Static methods52823.68%
▷ Public methods1,74278.12%
▷ Protected methods46020.63%
▷ Private methods281.26%
Functions53
▷ Named functions47.55%
▷ Anonymous functions4992.45%
Constants165
▷ Global constants15191.52%
▷ Class constants148.48%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
274 compressed PNG files occupy 0.95MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/resources/countries/TTO.png0.75KB0.87KB0.00%
site/resources/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
admin/resources/countries/CHE.png0.46KB0.72KB0.00%
admin/resources/countries/TMP.png0.64KB0.80KB0.00%
admin/resources/countries/LTU.png0.44KB0.69KB0.00%