67% cardealer

Code Review | Car Dealer (Dealership) and Vehicle sales WordPress Plugin

WordPress plugin Car Dealer (Dealership) and Vehicle sales WordPress Plugin scored67%from 54 tests.

About plugin

  • Plugin page: cardealer
  • Plugin version: 4.08
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 26, 2017
  • Latest release: Oct 17, 2023
  • Number of updates: 887
  • Update frequency: every 2.6 days
  • Top authors: sminozzi (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active /52,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.37MB] [CPU: ▲15.08ms] Passed 4 tests

A check of server-side resources used by Car Dealer (Dealership) and Vehicle sales WordPress Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9955.48 ▲12.69
Dashboard /wp-admin4.81 ▲1.5068.78 ▲17.34
Posts /wp-admin/edit.php4.90 ▲1.5469.74 ▲20.41
Add New Post /wp-admin/post-new.php7.36 ▲1.47121.59 ▲9.87
Media Library /wp-admin/upload.php4.74 ▲1.5264.75 ▲29.17
cardealer_settings /wp-admin/edit.php?post_type=cars&page=cardealer_settings4.7359.44
Settings /wp-admin/admin.php?page=cardealer-settings4.7252.33
Team /wp-admin/admin.php?page=md-team4.7253.74
CarDealer Designer /wp-admin/admin.php?page=md-designer4.7254.34
Makes /wp-admin/admin.php?page=md-makes4.7252.40
Dashboard /wp-admin/admin.php?page=car_dealer_plugin4.75423.34
Fields Table /wp-admin/admin.php?page=fields-table4.7261.08
CarDealer Designer /wp-admin/themes.php?page=Car_Dealer_Designer4.7253.10
Cars Table /wp-admin/admin.php?page=cars-table4.7253.78
Locations /wp-admin/admin.php?page=md-locations4.7253.80

Server storage [IO: ▲7.09MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 224 new files
Database: no new tables, 27 new options
New WordPress options
theysaidso_admin_options
cardealer_plugin_version
widget_featuredwidget
widget_searchwidget
CarDealer_show_year
can_compress_scripts
meta_boxes
CarDealer_recipientEmail
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Car Dealer (Dealership) and Vehicle sales WordPress Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,125 ▲36416.08 ▲1.5311.66 ▲9.9440.45 ▼2.03
Dashboard /wp-admin2,326 ▲1465.66 ▲0.14112.19 ▲13.2185.49 ▲44.24
Posts /wp-admin/edit.php2,265 ▲1653.48 ▲1.5358.42 ▲22.1868.09 ▲31.98
Add New Post /wp-admin/post-new.php1,655 ▲12923.62 ▼0.08684.16 ▼6.20147.76 ▲78.50
Media Library /wp-admin/upload.php1,542 ▲1425.51 ▲1.22103.89 ▼0.6689.98 ▲44.84
cardealer_settings /wp-admin/edit.php?post_type=cars&page=cardealer_settings1,4402.5648.1870.22
Settings /wp-admin/admin.php?page=cardealer-settings2,1373.9545.2941.66
Team /wp-admin/admin.php?page=md-team2,4815.8184.5942.25
CarDealer Designer /wp-admin/admin.php?page=md-designer9,75525.40799.21124.19
Makes /wp-admin/admin.php?page=md-makes2,4744.4752.7340.34
Dashboard /wp-admin/admin.php?page=car_dealer_plugin1,5952.8642.8069.64
Fields Table /wp-admin/admin.php?page=fields-table2,2694.7862.8340.06
CarDealer Designer /wp-admin/themes.php?page=Car_Dealer_Designer9412.6334.8841.36
Cars Table /wp-admin/admin.php?page=cars-table2,0064.3355.7638.83
Locations /wp-admin/admin.php?page=md-locations2,2154.2651.2439.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 27 options in the database
    • meta_boxes
    • bill_last_feedback
    • widget_recent-posts
    • makes_children
    • widget_theysaidso_widget
    • CarDealer_show_make
    • widget_recentwidget
    • CarDealer_show_price
    • CarDealer_show_type
    • theysaidso_admin_options
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cars-table
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% 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 take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cardealer/includes/checkup/bill_class_diagnose.php
    • > /wp-content/plugins/cardealer/includes/templates/template-single.php
    • > /wp-content/plugins/cardealer/includes/checkup/_class_bill_catch_errors.php
    • > /wp-content/plugins/cardealer/includes/checkup/class_bill_catch_errors.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'CARDEALERPATHassets/php/cardealer_mr_image_resize.php' (include_path='.:/usr/share/php') in wp-content/plugins/cardealer/includes/templates/template-functions4.php on line 476
    • > PHP Fatal error
      Uncaught Error: Class 'cardealer\\WP\\Settings\\Page' not found in wp-content/plugins/cardealer/settings/options/plugin_options_tabbed.php:10
    • > PHP Warning
      require_once(CARDEALERPATHassets/php/cardealer_mr_image_resize.php): failed to open stream: No such file or directory in wp-content/plugins/cardealer/includes/templates/template-functions4.php on line 476
    • > PHP Warning
      Use of undefined constant CARDEALERPATH - assumed 'CARDEALERPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cardealer/includes/templates/template-functions.php on line 187
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cardealer/includes/multi/multi-functions.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cardealer/assets/php/cardealer_mr_image_resize.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CarDealerPlugin_activate\\is_multisite() in wp-content/plugins/cardealer/includes/feedback/activated-manager.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CarDealerPlugin_feedback\\is_multisite() in wp-content/plugins/cardealer/includes/feedback/feedback.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cardealer/includes/widgets/widgets.php:9
    • > PHP Warning
      Use of undefined constant CARDEALERPATH - assumed 'CARDEALERPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cardealer/includes/templates/template-functions4.php on line 476

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=md-designer
    • > Security (warning) in unknown
    /?customize_changeset_uuid=f892b71b-1842-4862-aa4c-5ce1699b5ba8&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Front cars Page Template Gallery), #2 (Front cars Page Template List View), #3 (cars Table Page), #4 (Front car Post Page), #5 (Search Filter Settings Setup), #6 (Features Fields Page Setup), #7 (Settings Page), #8 (Fields Table), #9 (Team Page)
Please take inspiration from this readme.txt

cardealer/cardealer.php Passed 13 tests

"Car Dealer (Dealership) and Vehicle sales WordPress Plugin" version 4.08's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Car Dealer Plugin for Car Dealer agency.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected35,063 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PO File135,0867,00312,115
PHP462,4351,21210,241
CSS255274456,781
SVG6003,949
JavaScript202213061,893
HTML354084

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.15
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods109
▷ Static methods1211.01%
▷ Public methods10697.25%
▷ Protected methods00.00%
▷ Private methods32.75%
Functions141
▷ Named functions14099.29%
▷ Anonymous functions10.71%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
37 PNG files occupy 0.47MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/help50.png6.20KB2.87KB▼ 53.74%
assets/images/close_banner.png0.44KB0.49KB0.00%
assets/images/oktick.png41.43KB11.19KB▼ 72.99%
assets/images/info.png1.49KB1.28KB▼ 14.32%
assets/images/coupon.png24.96KB5.09KB▼ 79.61%