10% car-demon

Code Review | Car Demon

WordPress plugin Car Demon scored 10% from 54 tests.

About plugin

  • Plugin page: car-demon
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-5.3.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2012
  • Latest release: Feb 3, 2020
  • Number of updates: 338
  • Update frequency: every 8.2 days
  • Top authors: theverylastperson (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

400+ active / 65,069 total downloads

Benchmarks

Plugin footprint 58% 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-demon/includes/cd-init.php+129
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.42MB] [CPU: ▲16.62ms] Passed 4 tests

Analyzing server-side resources used by Car Demon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4359.28 ▲16.94
Dashboard /wp-admin3.74 ▲0.4361.18 ▲10.52
Posts /wp-admin/edit.php3.78 ▲0.4363.43 ▲18.69
Add New Post /wp-admin/post-new.php6.26 ▲0.38184.55 ▲73.65
Media Library /wp-admin/upload.php3.67 ▲0.4460.95 ▲20.31
Locations /wp-admin/edit-tags.php?taxonomy=vehicle_location&post_type=cars_for_sale3.7448.29
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.6851.63
Vehicle Tags /wp-admin/edit-tags.php?taxonomy=vehicle_tag&post_type=cars_for_sale3.6154.63
Condition /wp-admin/edit-tags.php?taxonomy=vehicle_condition&post_type=cars_for_sale3.6148.82
Settings /wp-admin/edit.php?post_type=cars_for_sale&page=car_demon_settings_options3.8157.51
Add New /wp-admin/post-new.php?post_type=cars_for_sale3.86107.81
Cars For Sale /wp-admin/edit.php?post_type=cars_for_sale3.7345.20

Server storage [IO: ▲3.73MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 340 new files
Database: no new tables, 60 new options
New WordPress options
can_compress_scripts
default_trade_url
default_default_description
default_finance_email
default_finance_number
default_new_sales_name
default_hours
default_used_sales_email
default_used_mobile_provider
default_new_mobile_provider
...

Browser metrics Passed 4 tests

An overview of browser requirements for Car Demon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,385 ▲62426.84 ▲12.34170.97 ▲168.52142.53 ▲40.34
Dashboard /wp-admin2,370 ▲16610.81 ▲5.77287.91 ▲76.56186.47 ▲61.23
Posts /wp-admin/edit.php2,299 ▲2109.51 ▲7.51190.53 ▲81.82141.66 ▲5.60
Add New Post /wp-admin/post-new.php1,653 ▲23318.03 ▲0.31975.53 ▲176.43180.95 ▼43.12
Media Library /wp-admin/upload.php1,581 ▲19912.17 ▲8.02303.78 ▲115.94237.19 ▲91.96
Locations /wp-admin/edit-tags.php?taxonomy=vehicle_location&post_type=cars_for_sale1,9339.22227.98214.20
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,1139.20219.7382.26
Vehicle Tags /wp-admin/edit-tags.php?taxonomy=vehicle_tag&post_type=cars_for_sale1,4359.27162.01131.29
Condition /wp-admin/edit-tags.php?taxonomy=vehicle_condition&post_type=cars_for_sale1,4359.24125.92211.71
Settings /wp-admin/edit.php?post_type=cars_for_sale&page=car_demon_settings_options3,7339.56253.66288.33
Add New /wp-admin/post-new.php?post_type=cars_for_sale3,08411.88456.85430.27
Cars For Sale /wp-admin/edit.php?post_type=cars_for_sale1,4389.77191.46169.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 60 options in the database
    • default_finance_description
    • default_new_mobile_provider
    • db_upgraded
    • default_website
    • default_show_new_prices
    • widget_car_demon_random_car-widget
    • default_no_used_price
    • default_used_mobile_provider
    • widget_car_demon_calculator-widget
    • can_compress_scripts
    • ...

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 16× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/dist/img/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/dist/js/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/dist/css/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/modules/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/dist/fonts/index.php
    • > /wp-content/plugins/car-demon/shortcode/index.php
    • > /wp-content/plugins/car-demon/theme-files/js/lightGallery-1.6.0/dist/index.php
    • > /wp-content/plugins/car-demon/feeds/car-demon-xml-details.php
    • > /wp-content/plugins/car-demon/feeds/car-demon-xml-list.php
  • 58× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/car-demon/car-demon-forms/forms/finance/co_address.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function car_demon_query_search() in wp-content/plugins/car-demon/theme-files/search.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/car-demon/includes/create-post-types-tax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/car-demon/car-demon-forms/forms/finance/co_living_situation_previous.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/car-demon/includes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/car-demon/includes/shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/car-demon/admin/cd-nag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/car-demon/car-demon-forms/forms/finance/personal_info.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/car-demon/car-demon-forms/forms/finance/living_situation.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/car-demon/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This is a quick look at the inventory management screen. You can quickly change prices and mark vehicles sold without opening each vehicle.), #2 (Here's a glance of what you can do with Car Demon and some of it's extensions. The site you see here is using the basic Car Demon Theme.)
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can look at the official readme.txt

car-demon/car-demon.php Passed 13 tests

The main PHP file in "Car Demon" ver. 1.8.1 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Car Demon is a PlugIn designed for car dealers and other vehicle sales.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin53,424 lines of code in 187 files:
LanguageFilesBlank linesComment linesLines of code
PHP981,4312,75222,148
JavaScript503,6701,97721,056
CSS321251586,993
PO File11,1841,9482,807
XML100345
SVG50275

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity26.64
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods129
▷ Static methods53.88%
▷ Public methods10682.17%
▷ Protected methods2317.83%
▷ Private methods00.00%
Functions355
▷ Named functions355100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
74 PNG files occupy 1.12MB with 0.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme-files/js/lightGallery-1.6.0/dist/img/youtube-play.png5.06KB2.37KB▼ 53.04%
theme-files/images/btn_prev.png54.94KB2.06KB▼ 96.25%
images/car-demon-1.5.0-150x150.png26.70KB10.24KB▼ 61.64%
theme-files/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
theme-files/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.15KB▼ 59.69%