10% car-rental-widget-by-morerentalcarscom

Code Review | Car Rental Widget by MoreRentalCars.com

WordPress plugin Car Rental Widget by MoreRentalCars.com scored10%from 54 tests.

About plugin

  • Plugin page: car-rental-widget...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Sep 20, 2016
  • Number of updates: 19
  • Update frequency: every 20.6 days
  • Top authors: mdarmanin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,259 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/car-rental-widget-by-morerentalcarscom/index.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; mrc_widget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.58ms] Passed 4 tests

This is a short check of server-side resources used by Car Rental Widget by MoreRentalCars.com
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.25 ▼40.94
Dashboard /wp-admin2.08 ▼1.225.76 ▼50.62
Posts /wp-admin/edit.php2.08 ▼1.276.03 ▼43.68
Add New Post /wp-admin/post-new.php2.08 ▼3.807.14 ▼83.08
Media Library /wp-admin/upload.php2.08 ▼1.156.26 ▼33.80

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_mrc_id

Browser metrics Passed 4 tests

This is an overview of browser requirements for Car Rental Widget by MoreRentalCars.com
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.59 ▼0.716.96 ▲5.0638.71 ▼8.18
Dashboard /wp-admin2,206 ▲184.84 ▼1.02100.68 ▼20.3042.00 ▼3.05
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0240.11 ▲0.6133.39 ▼3.24
Add New Post /wp-admin/post-new.php1,514 ▼017.43 ▲0.01658.66 ▲23.9255.73 ▼4.72
Media Library /wp-admin/upload.php1,382 ▼64.17 ▼0.05101.25 ▼5.7643.73 ▼1.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/car-rental-widget-by-morerentalcarscom/index.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; mrc_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_mrc_id
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/car-rental-widget-by-morerentalcarscom/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (How the widget looks in my dev.), #2 (The search results provided through secure SSL connection.), #3 (Extra option provided during the booking process.), #4 (Collecting the user's information to process the reservation.), #5 (Collecting the payment details.)
You can look at the official readme.txt

car-rental-widget-by-morerentalcarscom/index.php 92% from 13 tests

Analyzing the main PHP file in "Car Rental Widget by MoreRentalCars.com" version 1.0.5
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("car-rental-widget-by-morerentalcarscom.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected61 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172342
CSS13012
JavaScript1017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/newlogosml.png7.48KB3.15KB▼ 57.90%