72% mortgage-calculator-plus

Code Review | Mortgage Calculator Plus

WordPress plugin Mortgage Calculator Plus scored72%from 54 tests.

About plugin

  • Plugin page: mortgage-calculat...
  • Plugin version: 1.38
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Jan 2, 2019
  • Latest release: Dec 7, 2019
  • Number of updates: 28
  • Update frequency: every 12.1 days
  • Top authors: mcplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,916 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.03ms] Passed 4 tests

Analyzing server-side resources used by Mortgage Calculator Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.38 ▼0.49
Dashboard /wp-admin3.43 ▲0.1351.06 ▲1.97
Posts /wp-admin/edit.php3.54 ▲0.1958.10 ▲6.23
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.05 ▼3.63
Media Library /wp-admin/upload.php3.35 ▲0.1238.85 ▲2.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_mcplus_widget
can_compress_scripts
widget_recent-comments
mc_plus_settings

Browser metrics Passed 4 tests

A check of browser resources used by Mortgage Calculator Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲15013.54 ▼0.888.76 ▲7.0440.40 ▼5.09
Dashboard /wp-admin2,226 ▲205.88 ▼0.02107.64 ▼0.3641.63 ▲1.17
Posts /wp-admin/edit.php2,114 ▲142.06 ▲0.0541.10 ▼0.9641.32 ▲4.52
Add New Post /wp-admin/post-new.php1,371 ▼17416.65 ▼6.37518.45 ▼164.2348.73 ▼7.08
Media Library /wp-admin/upload.php1,411 ▲144.26 ▲0.09100.70 ▼11.7541.26 ▼9.80
Mortgage Calculator Plus /wp-admin/mc-plus.php260.440.0716.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • mc_plus_settings
    • db_upgraded
    • widget_mcplus_widget

Smoke tests 25% 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 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mortgage-calculator-plus/inc/widget.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mortgage-calculator-plus/mc-plus.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/mc-plus.php
    • > Network (severe)
    wp-admin/mc-plus.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The mortgage calculator can be used as a widget to be placed easily anywhere on your website.), #2 (The mortgage calculator can also be used as a shortcode.), #3 (Fields and default values are customizable.)
You can look at the official readme.txt

mortgage-calculator-plus/mc-plus.php 92% from 13 tests

"Mortgage Calculator Plus" version 1.38's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mortgage-calculator-plus.php" instead of "mc-plus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected684 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38845566
CSS116076
JavaScript13142

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.50
▷ Minimum class complexity3.00
▷ Maximum class complexity20.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mcs.png0.91KB0.93KB0.00%