84% fc-mortgage-calculator

Code Review | FC's Mortgage Calculator

WordPress plugin FC's Mortgage Calculator scored84%from 54 tests.

About plugin

  • Plugin page: fc-mortgage-calcu...
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Mar 31, 2023
  • Number of updates: 61
  • Update frequency: every 37.9 days
  • Top authors: karl53 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /9,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.39ms] Passed 4 tests

A check of server-side resources used by FC's Mortgage Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1641.29 ▼0.97
Dashboard /wp-admin3.47 ▲0.1747.57 ▼1.04
Posts /wp-admin/edit.php3.52 ▲0.1643.26 ▼5.38
Add New Post /wp-admin/post-new.php6.05 ▲0.1679.69 ▼18.15
Media Library /wp-admin/upload.php3.39 ▲0.1635.50 ▲2.58

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 69 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
fcmortcalc_plugin
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for FC's Mortgage Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.071.79 ▲0.0247.23 ▼3.72
Dashboard /wp-admin2,209 ▲185.84 ▼0.07111.16 ▲10.2043.34 ▲3.70
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0534.53 ▼7.2133.63 ▼4.32
Add New Post /wp-admin/post-new.php1,533 ▲1923.42 ▲5.83667.58 ▼32.8965.22 ▲11.74
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0495.68 ▼11.6640.36 ▼7.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • fcmortcalc_plugin
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: date_mask in wp-content/plugins/fc-mortgage-calculator/en/calculator.gui.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fc-mortgage-calculator/fc-mortgage-calculator.php:109
    • > PHP Notice
      Undefined variable: brand_name in wp-content/plugins/fc-mortgage-calculator/en/calculator.gui.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/fc-mortgage-calculator/en/calculator.gui.php:23
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/fc-mortgage-calculator/en/calculator.gui.php on line 3

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

readme.txt 94% 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:
  • Donate link: Invalid url: "nada"
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "FC's Mortgage Calculator" version 1.5.4
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin16,320 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PO File142,4702,9026,816
JSON14003,402
JavaScript116249592,870
CSS63391211,873
PHP23221981,356
SVG1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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
There are no PNG files in this plugin