68% responsive-mortgage-calculator

Code Review | Responsive Mortgage Calculator

WordPress plugin Responsive Mortgage Calculator scored68%from 54 tests.

About plugin

  • Plugin page: responsive-mortga...
  • Plugin version: 2.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Nov 11, 2023
  • Number of updates: 152
  • Update frequency: every 22.0 days
  • Top authors: liddweaver (74.34%)rmcalculator (23.68%)mlcalc (3.29%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /149,996 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.31MB] [CPU: ▼3.96ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Mortgage Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3340.06 ▼0.14
Dashboard /wp-admin3.66 ▲0.3245.79 ▼14.12
Posts /wp-admin/edit.php3.72 ▲0.3649.69 ▲3.40
Add New Post /wp-admin/post-new.php6.18 ▲0.3090.80 ▼3.23
Media Library /wp-admin/upload.php3.53 ▲0.3038.01 ▲1.65
Resp Mortgage Calculator /wp-admin/options-general.php?page=lidd_mc_options3.4932.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 8 new options
New WordPress options
lidd_mc_options
widget_theysaidso_widget
can_compress_scripts
widget_lidd_mc_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Mortgage Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12613.50 ▼1.217.72 ▲5.9042.72 ▼0.44
Dashboard /wp-admin2,196 ▲195.58 ▼0.0491.06 ▼11.7938.79 ▼2.40
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0438.89 ▼0.9736.92 ▲2.87
Add New Post /wp-admin/post-new.php1,529 ▲323.26 ▲0.35631.94 ▼43.0253.74 ▼7.49
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0795.01 ▼13.8439.15 ▼6.45
Resp Mortgage Calculator /wp-admin/options-general.php?page=lidd_mc_options1,4261.9725.4831.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/responsive-mortgage-calculator/uninstall.php+13
    Constant LIDD_MC_OPTIONS already defined
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_lidd_mc_widget
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 19× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/display_form.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/load_form.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/LiddMCTextInput.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/LiddMCInputExtended.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/shortcode.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/load_scripts.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/LiddMCDetails.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/LiddMCSubmit.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/LiddMCSelectInput.php
    • > /wp-content/plugins/responsive-mortgage-calculator/includes/widget.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/responsive-mortgage-calculator/includes/defaults.php:40

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: You can look at the official readme.txt

responsive-mortgage-calculator/responsive-mortgage-calculator.php 92% from 13 tests

The principal PHP file in "Responsive Mortgage Calculator" v. 2.4.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,508 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP253878261,576
JavaScript16863381
PO File2174208366
CSS1250173
XML10012

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.29
Average class complexity10.17
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods54
▷ Static methods00.00%
▷ Public methods3259.26%
▷ Protected methods1120.37%
▷ Private methods1120.37%
Functions73
▷ Named functions73100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon_graph.png0.29KB0.16KB▼ 45.36%
img/icon_inspector.png0.49KB0.38KB▼ 22.31%