72% motors-car-dealership-classified-listings

Code Review | Motors – Car Dealer, Classifieds & Listing

WordPress plugin Motors – Car Dealer, Classifieds & Listing scored 72% from 54 tests.

About plugin

  • Plugin page: motors-car-dealer...
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Jul 27, 2023
  • Number of updates: 70
  • Update frequency: every 34.0 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

9,000+ active / 36,782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲2.34MB] [CPU: ▲12.81ms] Passed 4 tests

Server-side resources used by Motors – Car Dealer, Classifieds & Listing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.26 ▲1.8046.87 ▲1.36
Dashboard /wp-admin5.89 ▲2.5968.69 ▲18.77
Posts /wp-admin/edit.php5.93 ▲2.5771.12 ▲22.72
Add New Post /wp-admin/post-new.php8.39 ▲2.5199.80 ▲9.68
Media Library /wp-admin/upload.php5.71 ▲2.4955.70 ▲21.42
Add New /wp-admin/post-new.php?post_type=listings6.2569.91
Listing Categories /wp-admin/edit.php?post_type=listings&page=listing_categories6.1456.60
All Items /wp-admin/edit.php?post_type=listings5.8552.31
WebManager XML Import /wp-admin/edit.php?post_type=listings&page=stm_xml_import_automanager5.7048.39
All Test Drives /wp-admin/edit.php?post_type=test_drive_request5.8556.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Motors – Car Dealer, Classifieds & Listing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,097 ▲1,36216.93 ▲2.5326.98 ▲24.4941.30 ▼2.47
Dashboard /wp-admin2,506 ▲3187.14 ▲2.28150.44 ▲33.68105.38 ▲61.45
Posts /wp-admin/edit.php2,353 ▲2613.66 ▲1.6557.22 ▲20.1177.57 ▲43.55
Add New Post /wp-admin/post-new.php1,605 ▲8621.53 ▼1.45686.28 ▲57.2838.72 ▼17.54
Media Library /wp-admin/upload.php1,496 ▲1054.45 ▲0.2484.66 ▼17.38108.14 ▲61.33
Add New /wp-admin/post-new.php?post_type=listings3,90911.25349.52131.73
Listing Categories /wp-admin/edit.php?post_type=listings&page=listing_categories7,8184.70103.45138.33
All Items /wp-admin/edit.php?post_type=listings1,3063.6749.2073.56
WebManager XML Import /wp-admin/edit.php?post_type=listings&page=stm_xml_import_automanager1,5675.1587.0775.71
All Test Drives /wp-admin/edit.php?post_type=test_drive_request1,3233.6051.3173.33

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 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • current_queried_xml
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • stm_price_patched

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 23× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-gallery.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/nav.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-image.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-textarea.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-color.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-parent.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-location.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-radio-image.php
    • > /wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/tmpl/control-palette.php
  • 30× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-image.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-file.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-datetime.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-radio.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-checkboxes.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/settings/class-setting-array.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/motors-car-dealership-classified-listings/templates/modals/test-drive.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-datepicker.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/motors-car-dealership-classified-listings/includes/admin/butterbean/inc/controls/class-control-select-group.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_queried_object() in wp-content/plugins/motors-car-dealership-classified-listings/templates/user/public/user.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=listings&page=stm_xml_import_automanager
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=&libraries=places 232:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=listings&page=stm_xml_import_automanager
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=&libraries=places 163:373 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #8 (pro car dealership wordpress plugin), #9 (wordpress car listing plugin), #10 (wordpress dealership plugin)
Please take inspiration from this readme.txt

motors-car-dealership-classified-listings/stm_vehicles_listing.php 85% from 13 tests

"Motors – Car Dealer, Classifieds & Listing" version 1.4.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("motors-car-dealership-classified-listings.php" instead of "stm_vehicles_listing.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected43,688 lines of code in 218 files:
LanguageFilesBlank linesComment linesLines of code
PHP1522,8783,06017,417
CSS201,383958,638
JavaScript221,2301,0075,543
JSON7004,526
XML17163,771
Sass429002,638
SVG800754
Markdown41260401

PHP code Passed 2 tests

A brief analysis 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.39
Average class complexity7.89
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes00.00%
▷ Concrete classes47100.00%
▷ Final classes12.13%
Methods191
▷ Static methods189.42%
▷ Public methods18697.38%
▷ Protected methods10.52%
▷ Private methods42.09%
Functions186
▷ Named functions186100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.41MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
includes/customizer/assets/images/checkbox.png0.46KB0.42KB▼ 9.07%
assets/images/lightGallery/youtube-play.png5.06KB2.37KB▼ 53.04%
assets/images/tmp/admin_table.png99.65KB38.58KB▼ 61.28%
assets/css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%