84% loan-calculator-wp

Code Review | Loan Calculator WP

WordPress plugin Loan Calculator WP scored84%from 54 tests.

About plugin

  • Plugin page: loan-calculator-wp
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Oct 8, 2021
  • Latest release: Nov 27, 2023
  • Number of updates: 25
  • Update frequency: every 31.2 days
  • Top authors: worldweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /10,926 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by Loan Calculator WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.85 ▼5.08
Dashboard /wp-admin3.34 ▼0.0047.28 ▼11.29
Posts /wp-admin/edit.php3.39 ▲0.0447.63 ▼3.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.22 ▼0.66
Media Library /wp-admin/upload.php3.27 ▲0.0334.90 ▲2.76

Server storage [IO: ▲4.13MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
loan_calculator_db_version
ww_loan_option
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Loan Calculator WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.73 ▲0.091.66 ▼0.1040.45 ▼4.60
Dashboard /wp-admin2,211 ▲345.62 ▲0.0190.63 ▼9.3041.94 ▲1.98
Posts /wp-admin/edit.php2,116 ▲161.95 ▼0.0640.93 ▼0.8437.29 ▲0.09
Add New Post /wp-admin/post-new.php1,539 ▲323.02 ▲1.95571.13 ▼145.4546.63 ▼7.74
Media Library /wp-admin/upload.php1,410 ▲134.15 ▼0.0894.55 ▼4.7140.78 ▼3.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • ww_loan_option
    • widget_recent-comments
    • loan_calculator_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/loan-calculator-wp/includes/admin/forms/theme-templates/default-theme/ww-loan-calculator-loan-default-theme-form.php
    • > /wp-content/plugins/loan-calculator-wp/includes/admin/forms/theme-templates/new-theme/ww-loan-calculator-loan-new-theme-form.php

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: car loan, home loan, emi plugin, loan calculator, bank loan...

loan-calculator-wp/loan-calculator-wp.php 85% from 13 tests

"Loan Calculator WP" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected30,526 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript647415114,864
SVG3009,552
CSS45526633,596
PHP93522852,514

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.33
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/remove.png1.19KB1.24KB0.00%
includes/images/play-video.png55.38KB20.64KB▼ 62.73%
includes/images/group-5.png0.36KB0.28KB▼ 21.35%
includes/images/group-4.png0.77KB0.54KB▼ 29.77%
includes/images/add.png1.02KB1.03KB0.00%