10% pl-car-dealer

Code Review | PL Car Dealer

WordPress plugin PL Car Dealer scored10%from 54 tests.

About plugin

  • Plugin page: pl-car-dealer
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Apr 16, 2021
  • Number of updates: 25
  • Update frequency: every 77.0 days
  • Top authors: Pigrecolab (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,306 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/pl-car-dealer/PL-car-dealer.php+91
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.64MB] [CPU: ▼49.36ms] Passed 4 tests

This is a short check of server-side resources used by PL Car Dealer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.35 ▼1.1111.16 ▼29.34
Dashboard /wp-admin2.37 ▼0.937.75 ▼43.95
Posts /wp-admin/edit.php2.37 ▼0.998.20 ▼45.50
Add New Post /wp-admin/post-new.php2.37 ▼3.528.50 ▼78.66
Media Library /wp-admin/upload.php2.37 ▼0.868.04 ▼27.55
All the vehicles /wp-admin/edit.php?post_type=vehicle2.3710.03
Makes /wp-admin/edit-tags.php?taxonomy=cde_category_makes&post_type=vehicle2.378.73
Add /wp-admin/post-new.php?post_type=vehicle2.379.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 94 new files
Database: no new tables, 8 new options
New WordPress options
widget_cde_widget
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
widget_cde_makes_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

PL Car Dealer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.36 ▼1.021.59 ▼0.1539.88 ▼16.33
Dashboard /wp-admin2,285 ▲824.98 ▲0.08109.48 ▼0.6341.67 ▼0.58
Posts /wp-admin/edit.php2,167 ▲672.08 ▲0.0756.13 ▲15.8044.75 ▲8.78
Add New Post /wp-admin/post-new.php1,583 ▲5723.38 ▲5.82654.69 ▲19.0458.99 ▲6.50
Media Library /wp-admin/upload.php1,458 ▲584.30 ▲0.13102.70 ▲1.3943.20 ▲0.84
All the vehicles /wp-admin/edit.php?post_type=vehicle1,1342.0336.2735.80
Makes /wp-admin/edit-tags.php?taxonomy=cde_category_makes&post_type=vehicle1,3072.3428.3930.49
Add /wp-admin/post-new.php?post_type=vehicle2,5267.88178.9772.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/pl-car-dealer/PL-car-dealer.php+91
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_cde_widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_cde_makes_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vehicle
    • > Notice in wp-content/plugins/pl-car-dealer/PL-car-dealer.php+92
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pl-car-dealer/CMB2/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pl-car-dealer/CMB2/init.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pl-car-dealer/CMB2/init.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pl-car-dealer/templates/archive-vehicle.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pl-car-dealer/templates/advanced-vehicle-results.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pl-car-dealer/templates/single-vehicle.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pl-car-dealer/classes/cde_admin.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: car dealer, car seller, cars, autostock, selling cars

pl-car-dealer/PL-car-dealer.php 92% from 13 tests

The entry point to "PL Car Dealer" version 1.3.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pl-car-dealer.php" instead of "PL-car-dealer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected11,281 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,0631,0815,087
PHP191,1582,1573,674
Sass11168231,116
JavaScript10195152757
PO File2245302539
Markdown1390108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity36.56
▷ Minimum class complexity3.00
▷ Maximum class complexity121.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods212
▷ Static methods219.91%
▷ Public methods20094.34%
▷ Protected methods83.77%
▷ Private methods41.89%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.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
26 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/controls.png2.83KB1.28KB▼ 54.82%
images/loading_background.png0.15KB0.15KB▼ 0.64%
images/close_SC.png3.40KB2.03KB▼ 40.38%
CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%