84% simple-loan-mortgage-calculator

Code Review | Simple Loan and Mortgage Calculator

WordPress plugin Simple Loan and Mortgage Calculator scored 84% from 54 tests.

About plugin

  • Plugin page: simple-loan-mortg...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Jul 26, 2017
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: giannisdallas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 867 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.78ms] Passed 4 tests

Analyzing server-side resources used by Simple Loan and Mortgage Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.03 ▼6.80
Dashboard /wp-admin3.35 ▲0.0446.74 ▼3.14
Posts /wp-admin/edit.php3.40 ▲0.0446.53 ▼0.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.33 ▼16.24
Media Library /wp-admin/upload.php3.27 ▲0.0438.52 ▲4.60

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

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

Browser metrics Passed 4 tests

Simple Loan and Mortgage Calculator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.76 ▼0.8310.18 ▲8.1957.43 ▲13.79
Dashboard /wp-admin2,219 ▲315.84 ▲0.92101.34 ▼13.0442.06 ▼2.81
Posts /wp-admin/edit.php2,105 ▲132.03 ▲0.0138.47 ▼9.1736.92 ▲0.05
Add New Post /wp-admin/post-new.php1,551 ▲1823.00 ▼0.17652.73 ▼3.3064.58 ▲6.29
Media Library /wp-admin/upload.php1,407 ▲194.21 ▲0.0197.42 ▼6.4342.59 ▼4.39

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
  • The uninstall procedure has failed, leaving 9 options in the database
    • charts_field
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • currency_field
    • title_field
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 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/simple-loan-mortgage-calculator/simplelmc-config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-loan-mortgage-calculator/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

simple-loan-mortgage-calculator/index.php 92% from 13 tests

"Simple Loan and Mortgage Calculator" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-loan-mortgage-calculator.php" instead of "index.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 plugin21,450 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,1832912,304
JavaScript57853552,755
SVG1002,671
Sass1434341,768
LESS1434441,758
PHP24824194

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin