72% cardojo-lite

Code Review | CarDojo Lite

WordPress plugin CarDojo Lite scored72%from 54 tests.

About plugin

  • Plugin page: cardojo-lite
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8
  • WordPress version: 6.3.1
  • First release: Sep 25, 2017
  • Latest release: Sep 26, 2017
  • Number of updates: 38
  • Update frequency: every 0.1 days
  • Top authors: agurghis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼3.72ms] Passed 4 tests

An overview of server-side resources used by CarDojo Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3859.05 ▲18.47
Dashboard /wp-admin3.70 ▲0.3650.30 ▼9.98
Posts /wp-admin/edit.php3.82 ▲0.4646.95 ▲0.83
Add New Post /wp-admin/post-new.php6.31 ▲0.4386.83 ▼9.97
Media Library /wp-admin/upload.php3.64 ▲0.4141.36 ▲4.23
Fuel Types /wp-admin/edit-tags.php?taxonomy=vehicle_fuel_type&post_type=vehicle3.6541.82
Interior Colors /wp-admin/edit-tags.php?taxonomy=vehicle_interior_color&post_type=vehicle3.6743.96
Comfort /wp-admin/edit-tags.php?taxonomy=vehicle_comfort&post_type=vehicle3.6946.27
Extensions /wp-admin/edit.php?post_type=vehicle&page=cardojo-addons3.6133.16
Interior /wp-admin/edit-tags.php?taxonomy=vehicle_interior&post_type=vehicle3.6542.28
Exterior Colors /wp-admin/edit-tags.php?taxonomy=vehicle_exterior_color&post_type=vehicle3.7045.61
Inventory /wp-admin/edit.php?post_type=vehicle3.6838.64
CarDojo Lite Settings /wp-admin/edit.php?post_type=vehicle&page=cardojo-settings3.6336.00
Models /wp-admin/edit-tags.php?taxonomy=vehicle_model&post_type=vehicle3.6332.28
Safety /wp-admin/edit-tags.php?taxonomy=vehicle_safety&post_type=vehicle3.6745.98

Server storage [IO: ▲4.37MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 115 new files
Database: no new tables, 44 new options
New WordPress options
cardojo_price_num_decimals
vehicle_interior_children
cardojo_measurement_type
vehicle_visibility_children
cardojo_currency_position
cardojo_submit_car_form_page_id
promoted_cron_jobs
cardojo_posts_per_page
vehicle_exterior_children
cardojo_contact_form_name_error
...

Browser metrics Passed 4 tests

CarDojo Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,327 ▲58117.93 ▲3.5755.48 ▲53.7847.00 ▲3.36
Dashboard /wp-admin2,336 ▲1446.46 ▲1.52116.22 ▲9.1743.52 ▲0.74
Posts /wp-admin/edit.php2,247 ▲1583.22 ▲1.2245.02 ▲9.0051.86 ▲14.79
Add New Post /wp-admin/post-new.php1,792 ▲27824.11 ▲6.66689.78 ▲6.0236.42 ▼23.32
Media Library /wp-admin/upload.php1,527 ▲1395.65 ▲1.40100.44 ▼10.8043.79 ▼8.59
Fuel Types /wp-admin/edit-tags.php?taxonomy=vehicle_fuel_type&post_type=vehicle1,7063.0640.3961.39
Interior Colors /wp-admin/edit-tags.php?taxonomy=vehicle_interior_color&post_type=vehicle2,0263.5460.3635.39
Comfort /wp-admin/edit-tags.php?taxonomy=vehicle_comfort&post_type=vehicle2,5223.1341.4572.92
Extensions /wp-admin/edit.php?post_type=vehicle&page=cardojo-addons9672.8941.0134.92
Interior /wp-admin/edit-tags.php?taxonomy=vehicle_interior&post_type=vehicle1,8993.2242.0136.32
Exterior Colors /wp-admin/edit-tags.php?taxonomy=vehicle_exterior_color&post_type=vehicle2,4393.7354.1863.88
Inventory /wp-admin/edit.php?post_type=vehicle1,2383.2243.0754.86
CarDojo Lite Settings /wp-admin/edit.php?post_type=vehicle&page=cardojo-settings1,9723.1544.7427.68
Models /wp-admin/edit-tags.php?taxonomy=vehicle_model&post_type=vehicle1,4063.1937.1542.87
Safety /wp-admin/edit-tags.php?taxonomy=vehicle_safety&post_type=vehicle2,2583.2442.8353.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 44 options in the database
    • vehicle_interior_children
    • cardojo_finance_disclaimer
    • can_compress_scripts
    • vehicle_visibility_children
    • cardojo_contact_form_phone_error
    • cardojo_posts_per_page
    • theysaidso_admin_options
    • cardojo_cars_page_id
    • vehicle_exterior_color_children
    • cardojo_price_num_decimals
    • ...

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cardojo-lite/includes/admin/partials/cardojo-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cardojo-lite/templates/content-no-cars-found.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cardojo-lite/templates/content-single-vehicle.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=vehicle_safety&post_type=vehicle
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key&ver=6.3.1 210: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"

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: car, dealer, cardealer, marketplace, car-dealer...

cardojo-lite/cardojo.php 85% from 13 tests

The main PHP script in "CarDojo Lite" version 1.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cardojo-lite.php" instead of "cardojo.php")

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
Success! There were no dangerous files found in this plugin38,181 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
PHP667,2042,15220,147
CSS91,1411617,289
JavaScript151,9191,6476,860
SVG2003,885

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.00
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods191
▷ Static methods2211.52%
▷ Public methods17189.53%
▷ Protected methods10.52%
▷ Private methods199.95%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants25.26%
▷ Class constants3694.74%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/select-arrow.png1.22KB0.29KB▼ 76.06%
assets/images/sort_asc.png1.09KB0.25KB▼ 77.46%
assets/images/carfax-logo_03.png5.86KB2.76KB▼ 52.89%
assets/images/logo-setup-wizard.png3.26KB1.26KB▼ 61.23%
assets/images/cardojo_logo.png10.20KB5.06KB▼ 50.41%