10% car-loan-calculator

Code Review | Car Loan Calculator

WordPress plugin Car Loan Calculator scored 10% from 54 tests.

About plugin

  • Plugin page: car-loan-calculator
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: Mar 8, 2013
  • Latest release: Mar 20, 2014
  • Number of updates: 8
  • Update frequency: every 47.4 days
  • Top authors: jollyjollyjolly (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 3,448 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
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/car-loan-calculator/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; MyNewWidget has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼188.11ms] Passed 4 tests

Analyzing server-side resources used by Car Loan Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼0.949.35 ▼13.06
Dashboard /wp-admin1.80 ▼1.2611.05 ▼36.61
Posts /wp-admin/edit.php1.80 ▼1.315.15 ▼38.56
Add New Post /wp-admin/post-new.php1.80 ▼3.646.02 ▼648.29
Media Library /wp-admin/upload.php1.80 ▼1.206.75 ▼28.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_mynewwidget

Browser metrics Passed 4 tests

Checking browser requirements for Car Loan Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10615.75 ▲0.2112.62 ▲4.4746.05 ▼2.75
Dashboard /wp-admin2,973 ▲425.99 ▲0.04148.75 ▲1.72106.61 ▲1.75
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0069.97 ▲1.0496.24 ▲0.30
Add New Post /wp-admin/post-new.php1,683 ▼017.26 ▼1.53384.50 ▼15.78107.21 ▼1.72
Media Library /wp-admin/upload.php1,804 ▲565.01 ▲0.04212.29 ▲61.98161.39 ▲49.78

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/car-loan-calculator/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; MyNewWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_mynewwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/car-loan-calculator/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • Screenshots: Screenshot #1 (http://zazulu.com/screenshot.jpg) image missing
The official readme.txt might help

car-loan-calculator/index.php 85% from 13 tests

Analyzing the main PHP file in "Car Loan Calculator" version 1.0.2
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 224 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("car-loan-calculator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin448 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript140293
PHP115979
CSS119076

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin