78% mortgage-calculators-wp

Code Review | Mortgage Calculators WP

WordPress plugin Mortgage Calculators WP scored78%from 54 tests.

About plugin

  • Plugin page: mortgage-calculat...
  • Plugin version: 1.56
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2018
  • Latest release: Apr 26, 2023
  • Number of updates: 60
  • Update frequency: every 27.5 days
  • Top authors: 8blocks (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /19,992 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.52MB] [CPU: ▼0.49ms] Passed 4 tests

Server-side resources used by Mortgage Calculators WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.4643.75 ▼1.15
Dashboard /wp-admin4.16 ▲0.5953.56 ▲3.16
Posts /wp-admin/edit.php4.21 ▲0.5357.49 ▲2.38
Add New Post /wp-admin/post-new.php6.69 ▲0.55100.02 ▼3.80
Media Library /wp-admin/upload.php4.02 ▲0.5342.02 ▲0.63

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mortgage Calculators WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.33 ▼1.059.28 ▲7.6838.55 ▼4.75
Dashboard /wp-admin2,215 ▲385.66 ▲0.0384.57 ▼6.0769.81 ▲24.27
Posts /wp-admin/edit.php2,141 ▲412.18 ▲0.1443.64 ▲1.2039.86 ▲3.37
Add New Post /wp-admin/post-new.php1,710 ▲17922.16 ▼1.14756.68 ▲70.5538.12 ▼10.20
Media Library /wp-admin/upload.php1,429 ▲264.25 ▼0.0192.53 ▼15.3668.43 ▲19.80

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mortgage-calculators-wp/mortgage-calculators-wp.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/mortgage-calculators-wp/includes/functions/emails/rc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mortgage-calculators-wp/includes/shortcodes/views/mha.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/mortgage-calculators-wp/includes/functions/emails/mha.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mortgage-calculators-wp/includes/options/update_network_options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/mortgage-calculators-wp/includes/functions/emails/fha.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/mortgage-calculators-wp/includes/functions/emails/cv.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/mortgage-calculators-wp/includes/functions/emails/va.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function use_network_settings() in wp-content/plugins/mortgage-calculators-wp/includes/shortcodes/views/conventional.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mortgage-calculators-wp/includes/shortcodes/views/va.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mortgage-calculators-wp/includes/shortcodes/views/fha.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: mortgage calculator, mortgage calc, real estate, responsive mortgage calculator, loan calculator...

mortgage-calculators-wp/mortgage-calculators-wp.php 92% from 13 tests

The main file in "Mortgage Calculators WP" v. 1.56 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected6,535 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4884943,264
PHP18374881,612
PO File56561,1061,474
CSS31047105
XML130080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions43
▷ Named functions4195.35%
▷ Anonymous functions24.65%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png3.93KB1.83KB▼ 53.37%
assets/images/calculator.png0.50KB0.36KB▼ 27.71%
assets/images/icon-128x128.png3.40KB1.73KB▼ 49.02%
assets/images/banner-772x250.png37.94KB15.19KB▼ 59.96%