10% stock-car-listing-from-autocerfa

Code Review | Autocerfa Connector

WordPress plugin Autocerfa Connector scored10%from 54 tests.

About plugin

  • Plugin page: stock-car-listing...
  • Plugin version: 2.3.14
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2020
  • Latest release: Nov 12, 2023
  • Number of updates: 88
  • Update frequency: every 13.8 days
  • Top authors: opcodespace (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,952 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/stock-car-listing-from-autocerfa/src/abstract/AbstractModule.php+138
    Undefined offset: 0

Server metrics [RAM: ▲0.45MB] [CPU: ▲3.95ms] Passed 4 tests

Analyzing server-side resources used by Autocerfa Connector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4747.81 ▲6.32
Dashboard /wp-admin3.77 ▲0.4755.43 ▲6.64
Posts /wp-admin/edit.php3.81 ▲0.4556.63 ▲12.23
Add New Post /wp-admin/post-new.php6.37 ▲0.4891.76 ▼9.27
Media Library /wp-admin/upload.php3.64 ▲0.4146.23 ▲12.11
Upgrade to pro /wp-admin/admin.php?page=upgrade-to-pro3.6245.11
Support /wp-admin/admin.php?page=support3.6240.05
License Key /wp-admin/admin.php?page=license-key3.6240.23
Autocerfa /wp-admin/admin.php?page=autocerfa3.6938.83
Settings /wp-admin/admin.php?page=autocerfa-settings3.6739.13

Server storage [IO: ▲6.79MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 216 new files
Database: 1 new table, 9 new options
New tables
wp_autocerfa_badges
New WordPress options
autocerfa_requires_flush
widget_theysaidso_widget
version
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
autocerfa_plugin_version

Browser metrics Passed 4 tests

An overview of browser requirements for Autocerfa Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,049 ▲28714.95 ▲0.6014.63 ▲12.9239.55 ▼4.94
Dashboard /wp-admin2,274 ▲975.14 ▼0.4789.05 ▼10.7539.04 ▼4.28
Posts /wp-admin/edit.php2,189 ▲892.36 ▲0.3645.90 ▲9.7936.39 ▲1.43
Add New Post /wp-admin/post-new.php1,596 ▲7021.96 ▼1.30713.52 ▲42.2937.75 ▼23.79
Media Library /wp-admin/upload.php1,492 ▲894.85 ▲0.60104.18 ▲6.8046.91 ▲3.88
Upgrade to pro /wp-admin/admin.php?page=upgrade-to-pro9472.5536.3636.91
Support /wp-admin/admin.php?page=support9292.6531.2429.27
License Key /wp-admin/admin.php?page=license-key9212.4835.6824.13
Autocerfa /wp-admin/admin.php?page=autocerfa1,2952.6436.1952.20
Settings /wp-admin/admin.php?page=autocerfa-settings1,5412.3439.5173.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_autocerfa_badges
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • autocerfa_plugin_version
    • widget_recent-posts
    • widget_recent-comments
    • autocerfa_requires_flush
    • version

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=autocerfa-settings
    • > Notice in wp-content/plugins/stock-car-listing-from-autocerfa/src/AutocerfaStockPost.php+136
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=autocerfa-settings
    • > Notice in wp-content/plugins/stock-car-listing-from-autocerfa/view/admin/shortcodes.php+18
    Undefined index: tab

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/stock-car-listing-from-autocerfa/view/front/short-listed-cars/_without_slider.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stock-car-listing-from-autocerfa/view/front/autocerfa-search-box.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Crunched.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Expanded.php:22
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/stock-car-listing-from-autocerfa/view/front/short-listed-cars/_without_slider.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Compressed.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Compact.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/stock-car-listing-from-autocerfa/view/front/cars/sidebar.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Nested.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\ode' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Node/Number.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/stock-car-listing-from-autocerfa/vendor/scssphp/scssphp/src/Formatter/Debug.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=autocerfa
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=autocerfa 345 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=autocerfa
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=autocerfa 354 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=autocerfa-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=autocerfa-settings 361 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=autocerfa-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=autocerfa-settings 370 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

stock-car-listing-from-autocerfa/app.php 85% from 13 tests

Analyzing the main PHP file in "Autocerfa Connector" version 2.3.14
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("stock-car-listing-from-autocerfa.php" instead of "app.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/stock-car-listing-from-autocerfa/vendor/bin/pscss.bat
63,241 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
JSON60022,765
CSS2145912715,279
PHP933,5534,13014,772
JavaScript196054576,874
Sass15151222,316
SVG303770
PO File1161204406
Markdown221045
Bourne Shell13110
DOS Batch1004

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,209)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 195)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity46.13
▷ Minimum class complexity1.00
▷ Maximum class complexity1,209.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity195.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes52
▷ Abstract classes59.62%
▷ Concrete classes4790.38%
▷ Final classes00.00%
Methods606
▷ Static methods579.41%
▷ Public methods27345.05%
▷ Protected methods31952.64%
▷ Private methods142.31%
Functions23
▷ Named functions730.43%
▷ Anonymous functions1669.57%
Constants82
▷ Global constants89.76%
▷ Class constants7490.24%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/add-on/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/add-on/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/add-on/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/add-on/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/add-on/choosen/chosen-sprite.png0.63KB0.88KB0.00%