84% loan-repayment-calculator

Code Review | Loan Repayment Calculator

WordPress plugin Loan Repayment Calculator scored84%from 54 tests.

About plugin

  • Plugin page: loan-repayment-ca...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 29, 2018
  • Latest release: Apr 29, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: simplifyplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Loan Repayment Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0333.85 ▼5.40
Dashboard /wp-admin3.33 ▲0.0344.97 ▲0.11
Posts /wp-admin/edit.php3.38 ▲0.0243.53 ▼6.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.79 ▲1.51
Media Library /wp-admin/upload.php3.26 ▲0.0237.94 ▲0.86
Loan Calculator /wp-admin/admin.php?page=loan-plugin3.2231.16
Setting /wp-admin/admin.php?page=loan-plugin-setting3.2231.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loan Repayment Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲15414.07 ▼0.6111.71 ▲9.7749.03 ▲6.60
Dashboard /wp-admin2,232 ▲475.79 ▼0.22101.95 ▼7.3141.77 ▼0.52
Posts /wp-admin/edit.php2,118 ▲322.04 ▼0.0133.83 ▼1.5333.77 ▼1.61
Add New Post /wp-admin/post-new.php1,691 ▲16122.90 ▼0.19585.67 ▼106.7650.24 ▼1.74
Media Library /wp-admin/upload.php1,411 ▲234.19 ▲0.0097.39 ▼13.8346.74 ▲4.41
Loan Calculator /wp-admin/admin.php?page=loan-plugin8792.0221.5428.79
Setting /wp-admin/admin.php?page=loan-plugin-setting8482.0324.9226.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loan-repayment-calculator/loan-emi-calculator.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: emi calculation, loan repayment calculator, emi calculator, loan calculator, repayment calculator...

loan-repayment-calculator/loan-emi-calculator.php 92% from 13 tests

The main PHP file in "Loan Repayment Calculator" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("loan-repayment-calculator.php" instead of "loan-emi-calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,712 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS374601,465
PHP14314196
JavaScript251251

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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 files were detected