78% cardealerpress

Code Review | CarDealerPress

WordPress plugin CarDealerPress scored78%from 54 tests.

About plugin

  • Plugin page: cardealerpress
  • Plugin version: 6.2.2303.01
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: Mar 31, 2023
  • Number of updates: 216
  • Update frequency: every 13.3 days
  • Top authors: dealertrend (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /14,918 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.00ms] Passed 4 tests

Server-side resources used by CarDealerPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1544.59 ▼1.43
Dashboard /wp-admin3.43 ▲0.1348.36 ▲2.75
Posts /wp-admin/edit.php3.55 ▲0.1949.21 ▲1.34
Add New Post /wp-admin/post-new.php6.03 ▲0.1589.65 ▼6.67
Media Library /wp-admin/upload.php3.36 ▲0.1337.08 ▲4.71
Help /wp-admin/admin.php?page=cardealerpress_help3.3739.98
Admin Settings /wp-admin/admin.php?page=cardealerpress_admin3.4039.27

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 195 new files
Database: 4 new tables, 8 new options
New tables
cdp_inventory_import_1
cdp_inventory_1
cdp_data
cdp_companies
New WordPress options
widget_theysaidso_widget
can_compress_scripts
cardealerpress_settings
theysaidso_admin_options
cdp_requirements_checked
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CarDealerPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲10313.23 ▼1.141.73 ▼0.6533.75 ▼18.25
Dashboard /wp-admin2,262 ▲805.82 ▼0.0897.98 ▼6.3089.80 ▲47.77
Posts /wp-admin/edit.php2,141 ▲522.02 ▼0.0236.39 ▼5.6136.80 ▲0.86
Add New Post /wp-admin/post-new.php1,633 ▲11921.94 ▲4.55741.96 ▲91.7341.96 ▼15.82
Media Library /wp-admin/upload.php1,441 ▲534.21 ▼0.0399.24 ▼1.5174.18 ▲34.37
Help /wp-admin/admin.php?page=cardealerpress_help1,1693.4047.0685.15
Admin Settings /wp-admin/admin.php?page=cardealerpress_admin1,3643.3845.6882.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cardealerpress/application/views/sitemap/inc/xml-sitemap-xsl.php
    • > /wp-content/plugins/cardealerpress/application/views/sitemap/inc/xml-sitemap-video-xsl.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cardealerpress/application/views/options/sort.php:18
    • > PHP Notice
      Undefined index: page in wp-content/plugins/cardealerpress/application/views/options/admin_header.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cardealerpress/application/views/inventory/autocheck.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wordpress\\Plugins\\CarDealerPress\\Inventory\\Api\\cdp_plugin' not found in wp-content/plugins/cardealerpress/application/views/options/banners.php:20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cardealerpress/application/views/options/carfax.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wordpress\\Plugins\\CarDealerPress\\Inventory\\Api\\itemize_vehicle() in wp-content/plugins/cardealerpress/application/views/inventory/dolphin/detail.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cardealerpress/application/views/inventory/inv_index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wordpress\\Plugins\\CarDealerPress\\Inventory\\Api\\itemize_vehicle() in wp-content/plugins/cardealerpress/application/views/inventory/eagle/detail.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wordpress\\Plugins\\CarDealerPress\\Inventory\\Api\\remove_query_arg() in wp-content/plugins/cardealerpress/application/views/inventory/dolphin/list.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cardealerpress/application/views/options/shortcode.php:4

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: automotive, custom taxonomy, car dealer, car sales, cars...

cardealerpress/cardealerpress.php 92% from 13 tests

The entry point to "CarDealerPress" version 6.2.2303.01 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)

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 plugin36,492 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
CSS2253832814,598
PHP621,35954513,183
JavaScript191,3395068,284
HTML1510414
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity70.71
▷ Minimum class complexity4.00
▷ Maximum class complexity282.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods255
▷ Static methods72.75%
▷ Public methods24495.69%
▷ Protected methods00.00%
▷ Private methods114.31%
Functions89
▷ Named functions8292.13%
▷ Anonymous functions77.87%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
63 PNG files occupy 0.31MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
application/assets/css/jquery-css/images/ui-bg_flat_10_000000_40x100.png0.24KB0.08KB▼ 64.34%
application/assets/images/question-img_20x16.png3.49KB0.73KB▼ 79.15%
application/assets/css/jquery-css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.31KB0.14KB▼ 54.26%
application/assets/images/cdp_logo_50x44.png6.48KB2.69KB▼ 58.55%
application/assets/images/tags/local-trade-in.png3.53KB1.97KB▼ 44.07%