68% car-loan-application-and-calculator-module

Code Review | Car Loan Application and Calculator Plugin

WordPress plugin Car Loan Application and Calculator Plugin scored68%from 54 tests.

About plugin

  • Plugin page: car-loan-applicat...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Sep 21, 2013
  • Number of updates: 21
  • Update frequency: every 3.6 days
  • Top authors: darrylcoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,566 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▼1.25ms] Passed 4 tests

Server-side resources used by Car Loan Application and Calculator Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0439.71 ▼3.05
Dashboard /wp-admin3.33 ▲0.0346.88 ▼1.41
Posts /wp-admin/edit.php3.38 ▲0.0347.94 ▲5.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.23 ▼0.34
Media Library /wp-admin/upload.php3.25 ▲0.0336.20 ▼0.18

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 48 new files
Database: 2 new tables, 11 new options
New tables
wp_clm_co_buyers
wp_clm_applicants
New WordPress options
clm_clean_db
clm_provinces
clm_vehicles
db_upgraded
widget_recent-comments
can_compress_scripts
clm_emails
theysaidso_admin_options
widget_theysaidso_widget
clm_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Car Loan Application and Calculator Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲22213.69 ▼1.068.71 ▲6.6041.65 ▼8.57
Dashboard /wp-admin2,280 ▲895.84 ▲0.9299.63 ▼3.3060.23 ▲18.72
Posts /wp-admin/edit.php2,103 ▲141.97 ▼0.0638.74 ▲1.5232.94 ▼0.82
Add New Post /wp-admin/post-new.php1,524 ▼2323.06 ▲4.80683.20 ▲99.3552.69 ▼0.94
Media Library /wp-admin/upload.php1,399 ▲144.16 ▼0.0593.42 ▼6.2469.02 ▲18.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_clm_co_buyers
    • wp_clm_applicants
  • The uninstall procedure has failed, leaving 11 options in the database
    • clm_vehicles
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • clm_clean_db
    • clm_emails
    • clm_provinces
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/car-loan-application-and-calculator-module/libs/clm-captcha/captcha.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/car-loan-application-and-calculator-module/Car_loan_module.php:24
    • > PHP Warning
      Use of undefined constant DB_USER - assumed 'DB_USER' (this will throw an Error in a future version of PHP) in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php on line 17
    • > PHP Notice
      Trying to get property 'base_prefix' of non-object in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/car-loan-application-and-calculator-module/view/front_calc_form.php:176
    • > PHP Warning
      Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' (this will throw an Error in a future version of PHP) in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php on line 19
    • > PHP Warning
      Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/car-loan-application-and-calculator-module/controller/ajax.php:98
    • > PHP Fatal error
      Uncaught Error: Class 'SKY_WPDB' not found in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/car-loan-application-and-calculator-module/view/front_application_form.php:1207
    • > PHP Warning
      Use of undefined constant DB_HOST - assumed 'DB_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/car-loan-application-and-calculator-module/clm-config.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Car Loan Manager Admin Page)
The official readme.txt is a good inspiration

car-loan-application-and-calculator-module/Car_loan_module.php 92% from 13 tests

The entry point to "Car Loan Application and Calculator Plugin" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("car-loan-application-and-calculator-module.php" instead of "Car_loan_module.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,897 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP182,9225974,061
CSS468571,308
JavaScript459666528

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/img/settings-icon.png3.64KB2.45KB▼ 32.74%
libs/jquery-ui/ui-lightness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
libs/jquery-ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
libs/jquery-ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
libs/jquery-ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%