61% 1003-mortgage-application

Code Review | 1003 Mortgage Application

WordPress plugin 1003 Mortgage Application scored61%from 54 tests.

About plugin

  • Plugin page: 1003-mortgage-app...
  • Plugin version: 1.83
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Nov 17, 2023
  • Number of updates: 56
  • Update frequency: every 27.0 days
  • Top authors: 8blocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,005 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.90MB] [CPU: ▼51.86ms] Passed 4 tests

An overview of server-side resources used by 1003 Mortgage Application
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.21 ▼38.24
Dashboard /wp-admin2.10 ▼1.205.73 ▼41.89
Posts /wp-admin/edit.php2.11 ▼1.257.61 ▼40.22
Add New Post /wp-admin/post-new.php2.10 ▼3.785.32 ▼87.07
Media Library /wp-admin/upload.php2.10 ▼1.136.15 ▼25.98
Settings /wp-admin/edit.php?post_type=mortgage_application&page=ma_setting2.115.57
Applications /wp-admin/edit.php?post_type=mortgage_application2.116.67
Bulk Export /wp-admin/edit.php?post_type=mortgage_application&page=ma_export2.115.52

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 113 new files
Database: no new tables, 24 new options
New WordPress options
mortgage_application_mail_subject
mortgage_application_user_mail_message
mortgage_application_email_recipients
mortgage_application_button_color
mortgage_application_mail_reply_to
mortgage_application_mail_from_name
widget_recent-comments
db_upgraded
widget_recent-posts
mortgage_application_reminder_mail_message
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for 1003 Mortgage Application
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲18814.15 ▼0.199.42 ▲7.6635.75 ▼8.95
Dashboard /wp-admin2,236 ▲595.06 ▼0.4795.82 ▼9.2272.06 ▲28.84
Posts /wp-admin/edit.php2,153 ▲532.34 ▲0.3233.17 ▼1.6132.34 ▼5.01
Add New Post /wp-admin/post-new.php1,576 ▲5024.12 ▲0.38748.88 ▲48.9831.57 ▼20.37
Media Library /wp-admin/upload.php1,449 ▲584.60 ▲0.4595.56 ▼2.7194.49 ▲52.73
Settings /wp-admin/edit.php?post_type=mortgage_application&page=ma_setting2,62711.07231.91138.19
Applications /wp-admin/edit.php?post_type=mortgage_application1,1822.4233.6729.40
Bulk Export /wp-admin/edit.php?post_type=mortgage_application&page=ma_export1,2702.3635.7422.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 24 options in the database
    • mortgage_application_button_color
    • theysaidso_admin_options
    • disclaimer_field_1
    • mortgage_application_mail_from_name
    • mortgage_application_success_message
    • widget_recent-posts
    • mortgage_application_mail_from
    • mortgage_application_user_mail_message
    • mortgage_application_progress_bar_color
    • mortgage_application_mail_reply_to
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mortgage_application&page=ma_export
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mortgage_application&page=ma_export
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mortgage_application&page=ma_export
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the sl-script-handle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mortgage_application&page=ma_setting
    • > Notice in wp-content/plugins/1003-mortgage-application/inc/admin/functions/functions.php+1091
    Undefined index: placeholder
    • > GET request to /wp-admin/edit.php?post_type=mortgage_application&page=ma_setting
    • > Notice in wp-content/plugins/1003-mortgage-application/inc/admin/functions/functions.php+1202
    Undefined index: id

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 take a closer look at the following
  • 19× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/1003-mortgage-application/inc/class/bitly_shortURL.php
    • > /wp-content/plugins/1003-mortgage-application/inc/initialize-plugin.php
    • > /wp-content/plugins/1003-mortgage-application/inc/templates/mortgage_export_form.php
    • > /wp-content/plugins/1003-mortgage-application/inc/class/general.php
    • > /wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM/fnm-import/getdata.php
    • > /wp-content/plugins/1003-mortgage-application/inc/templates/mortgage_metabox.php
    • > /wp-content/plugins/1003-mortgage-application/inc/templates/mortgage_setting.php
    • > /wp-content/plugins/1003-mortgage-application/inc/templates/mortgage_action_metabox.php
    • > /wp-content/plugins/1003-mortgage-application/inc/class/fnm/export.php
    • > /wp-content/plugins/1003-mortgage-application/inc/actions.php
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined property: stdClass::$is_there_co_borrower in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 364
    • > PHP Notice
      Undefined property: stdClass::$co_applicant_former_emp_data in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 57
    • > PHP Notice
      Undefined property: stdClass::$currently_own_real_estate in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 51
    • > PHP Notice
      Trying to get property 'real_estate_owned_market_value' of non-object in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM/getData.php on line 268
    • > PHP Notice
      Undefined property: stdClass::$same_mailing_address in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 69
    • > PHP Notice
      Undefined property: stdClass::$co_applicant_dec_permanent_resident in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 356
    • > PHP Notice
      Trying to get property 'retirement_fund_cash_value' of non-object in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM/getData.php on line 270
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM/fnm-import/src/Formatter.php on line 76
    • > PHP Notice
      Undefined property: stdClass::$employer_telephone in wp-content/plugins/1003-mortgage-application/inc/class/fnm/src/FNM.php on line 63
    • > PHP Fatal error
      Uncaught Error: Interface 'mapp_mortgageApplicationExport' not found in wp-content/plugins/1003-mortgage-application/inc/class/export_base.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: mortgage, real estate, application, 1003 application, mortgage application...

1003-mortgage-application/mortgage-application-pro.php 69% from 13 tests

The main PHP script in "1003 Mortgage Application" version 1.83 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Git Repository: There should be no Git repositories present in your plugin
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("1003-mortgage-application.php" instead of "mortgage-application-pro.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin67,756 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
JSON110052,502
PHP479192,8848,938
JavaScript83457563,106
CSS44231842,556
XML21170618
Markdown12036

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 383)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity58.30
▷ Minimum class complexity1.00
▷ Maximum class complexity447.00
Average method complexity11.25
▷ Minimum method complexity1.00
▷ Maximum method complexity383.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods154
▷ Static methods00.00%
▷ Public methods7448.05%
▷ Protected methods1912.34%
▷ Private methods6139.61%
Functions86
▷ Named functions8396.51%
▷ Anonymous functions33.49%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/correct.png4.94KB1.49KB▼ 69.84%
assets/img/cancel.png4.12KB1.30KB▼ 68.42%
assets/img/remove.png0.26KB0.24KB▼ 8.86%
assets/img/add.png0.26KB0.25KB▼ 6.64%