83% quick-interest-slider

Code Review | Loan Repayment Calculator and Application Form

WordPress plugin Loan Repayment Calculator and Application Form scored83%from 54 tests.

About plugin

  • Plugin page: quick-interest-sl...
  • Plugin version: 2.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 5, 2016
  • Latest release: Jul 28, 2023
  • Number of updates: 79
  • Update frequency: every 33.8 days
  • Top authors: aerin (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active /42,438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.09MB] [CPU: ▲1.48ms] Passed 4 tests

Server-side resources used by Loan Repayment Calculator and Application Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6744.63 ▲8.44
Dashboard /wp-admin4.58 ▲1.2851.69 ▲2.57
Posts /wp-admin/edit.php4.63 ▲1.2851.14 ▲2.71
Add New Post /wp-admin/post-new.php7.10 ▲1.2187.51 ▼7.79
Media Library /wp-admin/upload.php4.44 ▲1.2250.19 ▲16.82
Loan Calculator /wp-admin/options-general.php?page=quick-interest-slider/settings.php4.4741.71

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Loan Repayment Calculator and Application Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲21614.00 ▼0.5713.50 ▲11.9541.56 ▲0.97
Dashboard /wp-admin2,214 ▲345.55 ▼0.0782.19 ▼3.7338.16 ▼3.09
Posts /wp-admin/edit.php2,122 ▲222.00 ▲0.0534.33 ▼1.9633.86 ▼5.16
Add New Post /wp-admin/post-new.php6,153 ▲4,62524.53 ▲1.25852.45 ▲191.8856.10 ▲3.23
Media Library /wp-admin/upload.php1,422 ▲254.15 ▼0.0794.67 ▼1.1341.45 ▼2.06
Loan Calculator /wp-admin/options-general.php?page=quick-interest-slider/settings.php1,6873.4448.8835.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/quick-interest-slider/quick-interest-slider.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-interest-slider/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/quick-interest-slider/messages.php:82

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

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The repayment calculator), #2 (An example application form), #3 (Some of the settings), #4 (A bespoke version of the plugin)
  • Contributors: Please add at least on tag
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

quick-interest-slider/quick-interest-slider.php Passed 13 tests

"Loan Repayment Calculator and Application Form" version 2.9.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
61 characters long description:
Interest calculator with slider and multiple display options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected9,608 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,0871665,951
PO File39569592,064
JavaScript33551291,289
CSS26537304

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions81
▷ Named functions81100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.52MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close.png1.38KB1.13KB▼ 18.06%
screenshot-2.png113.44KB28.89KB▼ 74.54%
img/doc.png3.57KB1.61KB▼ 54.95%
img/pdf.png3.38KB1.56KB▼ 53.89%
img/files.png2.32KB0.93KB▼ 59.96%