89% rentalbuddy-car-rental-management

Code Review | RentalBuddy - Car Rental Management

WordPress plugin RentalBuddy - Car Rental Management scored89%from 54 tests.

About plugin

  • Plugin page: rentalbuddy-car-r...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2023
  • Latest release: Mar 17, 2023
  • Number of updates: 2
  • Update frequency: every 6.5 days
  • Top authors: sweetdaisy86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲1.63ms] Passed 4 tests

Server-side resources used by RentalBuddy - Car Rental Management
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2345.63 ▼3.45
Dashboard /wp-admin3.53 ▲0.2256.49 ▲10.75
Posts /wp-admin/edit.php3.64 ▲0.2952.41 ▲5.21
Add New Post /wp-admin/post-new.php6.11 ▲0.2399.10 ▼5.98
Media Library /wp-admin/upload.php3.45 ▲0.2264.40 ▲28.49
Cars /wp-admin/edit.php?post_type=rb_cars3.4940.46
Manufactures /wp-admin/edit-tags.php?taxonomy=car_manufactures&post_type=rb_cars3.4535.45
Bookings /wp-admin/admin.php?page=rb_booking_features3.4235.47
RentalBuddy /wp-admin/admin.php?page=rentalbuddy_settings_handle3.4239.04
Clients /wp-admin/admin.php?page=rb_booking_clients3.4235.89

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
rentalbuddy_version
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for RentalBuddy - Car Rental Management
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19913.69 ▼0.297.30 ▲5.2643.30 ▼0.61
Dashboard /wp-admin2,243 ▲525.89 ▲1.03105.51 ▼3.3466.96 ▲25.35
Posts /wp-admin/edit.php2,123 ▲342.01 ▼0.0133.72 ▼1.3635.38 ▲2.04
Add New Post /wp-admin/post-new.php1,542 ▲923.18 ▲0.25715.00 ▲61.4952.97 ▼4.36
Media Library /wp-admin/upload.php1,425 ▲374.15 ▼0.08127.42 ▲21.3894.46 ▲47.42
Cars /wp-admin/edit.php?post_type=rb_cars1,0921.9633.1528.36
Manufactures /wp-admin/edit-tags.php?taxonomy=car_manufactures&post_type=rb_cars1,3012.1427.5031.83
Bookings /wp-admin/admin.php?page=rb_booking_features8062.0224.5325.87
RentalBuddy /wp-admin/admin.php?page=rentalbuddy_settings_handle1,0002.6442.2733.16
Clients /wp-admin/admin.php?page=rb_booking_clients8052.0225.6126.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • rentalbuddy_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

rentalbuddy-car-rental-management/rentalbuddy-car-rental.php 69% from 13 tests

The main file in "RentalBuddy - Car Rental Management" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rentalbuddy-car-rental-management.php" instead of "rentalbuddy-car-rental.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin7,945 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS4500406,678
PHP17220961,071
JavaScript54114196

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/rentalbuddy.png10.01KB3.61KB▼ 63.91%
assets/admin/images/rentalbuddy-small.png3.15KB1.00KB▼ 68.31%