83% repayment-calculator

Code Review | Repayment Calculator

WordPress plugin Repayment Calculator scored83%from 54 tests.

About plugin

  • Plugin page: repayment-calculator
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2020
  • Latest release: Jul 28, 2023
  • Number of updates: 16
  • Update frequency: every 75.6 days
  • Top authors: aerin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /3,182 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.57ms] Passed 4 tests

Server-side resources used by Repayment Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.56 ▼2.45
Dashboard /wp-admin3.51 ▲0.2150.17 ▼1.13
Posts /wp-admin/edit.php3.62 ▲0.2754.30 ▲7.25
Add New Post /wp-admin/post-new.php6.09 ▲0.2080.77 ▼9.94
Media Library /wp-admin/upload.php3.41 ▲0.1843.66 ▲8.18
Repayment Calculator /wp-admin/options-general.php?page=repayment-calculator/settings.php3.4235.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Repayment Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲32415.46 ▲1.097.20 ▲5.4440.59 ▼5.47
Dashboard /wp-admin2,371 ▲1836.63 ▲1.76132.14 ▲15.0641.25 ▼5.80
Posts /wp-admin/edit.php2,277 ▲1883.65 ▲1.6457.73 ▲19.9634.96 ▲1.02
Add New Post /wp-admin/post-new.php6,374 ▲4,86028.44 ▲4.91902.42 ▲194.4440.02 ▼20.32
Media Library /wp-admin/upload.php1,416 ▲314.27 ▲0.0683.35 ▼30.0041.84 ▼5.76
Repayment Calculator /wp-admin/options-general.php?page=repayment-calculator/settings.php3,1004.31116.9834.99

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/repayment-calculator/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/repayment-calculator/repayment-calculator.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Contributors: No tags were detected
  • Screenshots: Add images for these screenshots: #1 (The repayment calculator), #2 (Credit score settings), #3 (Output settings)
You can look at the official readme.txt

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

The entry point to "Repayment Calculator" version 1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,307 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP317043715
JavaScript312957476
CSS2178116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png53.21KB15.41KB▼ 71.03%
screenshot-2.png51.22KB12.12KB▼ 76.33%
screenshot-3.png67.86KB18.27KB▼ 73.08%