89% mortgage-calculator-free

Code Review | Mortgage Calculator Free

WordPress plugin Mortgage Calculator Free scored 89% from 54 tests.

About plugin

  • Plugin page: mortgage-calculat...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 5.8.1
  • First release: May 29, 2018
  • Latest release: Jul 26, 2018
  • Number of updates: 8
  • Update frequency: every 7.4 days
  • Top authors: uri3000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 576 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.18ms] Passed 4 tests

An overview of server-side resources used by Mortgage Calculator Free
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0235.35 ▲1.00
Dashboard /wp-admin3.07 ▲0.0148.69 ▲1.98
Posts /wp-admin/edit.php3.12 ▲0.0142.00 ▼0.97
Add New Post /wp-admin/post-new.php5.43 ▲0.0091.35 ▼564.95
Media Library /wp-admin/upload.php3.01 ▲0.0032.07 ▼3.81

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
widget_mortgage_calculator_plugin

Browser metrics Passed 4 tests

Mortgage Calculator Free: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲21916.32 ▲0.7713.19 ▲2.8552.23 ▲5.15
Dashboard /wp-admin2,972 ▲355.93 ▲0.00146.83 ▲5.79118.37 ▼2.69
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0158.18 ▼8.0091.27 ▲5.19
Add New Post /wp-admin/post-new.php1,872 ▼019.09 ▼0.10368.77 ▼1.02113.94 ▲2.75
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.00143.52 ▲0.45122.96 ▲5.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_mortgage_calculator_plugin

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

mortgage-calculator-free/mortgage-calculator-plugin.php 85% from 13 tests

The main PHP file in "Mortgage Calculator Free" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mortgage-calculator-free.php" instead of "mortgage-calculator-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected836 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS22543485
PHP23144177
JavaScript1166100
PO File1252574

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.66MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png18.30KB5.28KB▼ 71.14%
assets/banner-1544x500.png292.57KB135.62KB▼ 53.65%
assets/screenshot-5.png57.85KB15.48KB▼ 73.24%
assets/icon-256x256.png37.51KB12.36KB▼ 67.06%
assets/icon-128-128.png15.27KB5.14KB▼ 66.33%