64% ultimate-mortgage-calculator

Code Review | Ultimate Mortgage Calculator

WordPress plugin Ultimate Mortgage Calculator scored64%from 54 tests.

About plugin

  • Plugin page: ultimate-mortgage...
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: Sep 26, 2020
  • Number of updates: 42
  • Update frequency: every 14.8 days
  • Top authors: gmaccario (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.76ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Mortgage Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2445.73 ▲7.12
Dashboard /wp-admin3.62 ▲0.3150.64 ▲1.02
Posts /wp-admin/edit.php3.67 ▲0.3151.95 ▲1.55
Add New Post /wp-admin/post-new.php6.15 ▲0.2791.20 ▼10.15
Media Library /wp-admin/upload.php3.48 ▲0.2537.82 ▲0.54

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Mortgage Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.36 ▼0.182.23 ▲0.4844.16 ▼3.43
Dashboard /wp-admin2,212 ▲355.59 ▲0.0286.26 ▼9.0843.31 ▲2.37
Posts /wp-admin/edit.php2,120 ▲232.06 ▲0.0937.96 ▲1.5934.09 ▲1.08
Add New Post /wp-admin/post-new.php1,543 ▲1723.36 ▲0.26666.42 ▲51.4957.79 ▼1.38
Media Library /wp-admin/upload.php1,420 ▲204.23 ▲0.0397.71 ▼7.4840.12 ▼3.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/ultimate-mortgage-calculator/ultimate_mortgage_calculator.php+27
    Cannot redeclare ultimate_mortgage_calculator_init() (previously declared in wp-content/plugins/ultimate-mortgage-calculator/ultimate_mortgage_calculator.php:30)
  • Incomplete uninstall procedure, leaving 33 files (0.10MB) in the plugin directory
    • (new file) README.txt
    • (new file) classes/controllers/Backend.php
    • (new file) assets/js/backend.js
    • (new file) classes/general/Basic.php
    • (new file) classes/controllers/Controller.php
    • (new file) assets/css/frontend.css
    • (new file) assets/css/backend.css
    • (new file) assets/images/loader.gif
    • (new file) classes/controllers/Frontend.php
    • (new file) assets/js/frontend.js
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 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 plugin_basename() in wp-content/plugins/ultimate-mortgage-calculator/ultimate_mortgage_calculator.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\General\\Classes\\Common' not found in wp-content/plugins/ultimate-mortgage-calculator/include/dispatcher.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\Setup\\Classes\\Manager' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/setup/BackendManager.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-mortgage-calculator/templates/frontend/ultimate_mortgage_calculator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\General\\Classes\\Basic' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/setup/Manager.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\Controller\\Classes\\Controller' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/controllers/Backend.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\Controller\\Classes\\Controller' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/controllers/Frontend.php:25
    • > PHP Warning
      Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-mortgage-calculator/ultimate_mortgage_calculator.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\General\\Classes\\Basic' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/setup/AjaxLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'UMC\\Setup\\Classes\\Manager' not found in wp-content/plugins/ultimate-mortgage-calculator/classes/setup/FrontendManager.php:24

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

ultimate-mortgage-calculator/ultimate_mortgage_calculator.php 92% from 13 tests

The main PHP script in "Ultimate Mortgage Calculator" version 1.6.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ultimate-mortgage-calculator.php" instead of "ultimate_mortgage_calculator.php")

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
Good job! No executable or dangerous file extensions detected1,665 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP243317831,540
JavaScript2214107
JSON20016
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.24
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces4
Interfaces10
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods110
▷ Static methods32.73%
▷ Public methods9687.27%
▷ Protected methods1210.91%
▷ Private methods21.82%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants12
▷ Global constants12100.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
PNG images were not found in this plugin