83% loan-calculator-with-chart

Code Review | Loan Calculator With Chart

WordPress plugin Loan Calculator With Chart scored83%from 54 tests.

About plugin

  • Plugin page: loan-calculator-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 4
  • Update frequency: every 96.3 days
  • Top authors: mgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.05ms] Passed 4 tests

Server-side resources used by Loan Calculator With Chart
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.74 ▲2.28
Dashboard /wp-admin3.31 ▲0.0150.96 ▼4.54
Posts /wp-admin/edit.php3.36 ▲0.0147.47 ▼5.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.17 ▼4.79
Media Library /wp-admin/upload.php3.23 ▲0.0145.58 ▲5.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Loan Calculator With Chart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15414.05 ▼0.2415.89 ▲14.1841.69 ▲0.30
Dashboard /wp-admin2,233 ▲565.84 ▲0.1599.88 ▼0.0244.01 ▲5.14
Posts /wp-admin/edit.php2,143 ▲432.32 ▲0.3041.56 ▲0.7832.18 ▼5.21
Add New Post /wp-admin/post-new.php1,566 ▲3823.01 ▲0.01683.00 ▲6.5036.03 ▼17.01
Media Library /wp-admin/upload.php1,435 ▲324.42 ▲0.20116.56 ▲10.1848.51 ▼0.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/loan-calculator-with-chart/loan-calculator.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/loan-calculator-with-chart/inc/lcwc_fronted.php:130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loan-calculator-with-chart/inc/lcwc_backend.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in loan-calculator-with-chart/assets to your readme.txt
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

loan-calculator-with-chart/loan-calculator.php 85% from 13 tests

This is the main PHP file of "Loan Calculator With Chart" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("loan-calculator-with-chart.php" instead of "loan-calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,362 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript490251620
PHP3188521
CSS23239221

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin