78% wprequal

Code Review | Mortgage Lead Capture System

WordPress plugin Mortgage Lead Capture System scored78%from 54 tests.

About plugin

  • Plugin page: wprequal
  • Plugin version: 8.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 276
  • Update frequency: every 9.3 days
  • Top authors: wprequal (97.46%)Kevin Brent (2.9%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /21,309 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.26MB] [CPU: ▲949.43ms] 50% from 4 tests

An overview of server-side resources used by Mortgage Lead Capture System
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 795.31ms on /wp-admin/edit.php?post_type=wpq_contact_form)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 949.43ms on /wp-admin/edit.php?post_type=wpq_contact_form)
PageMemory (MB)CPU Time (ms)
Home /4.73 ▲1.26849.77 ▲811.18
Dashboard /wp-admin4.58 ▲1.23821.49 ▲759.91
Posts /wp-admin/edit.php4.63 ▲1.271,344.75 ▲1,299.39
Add New Post /wp-admin/post-new.php7.20 ▲1.301,012.37 ▲927.23
Media Library /wp-admin/upload.php4.50 ▲1.271,501.29 ▲1,465.98
Survey Forms /wp-admin/edit.php?post_type=wpq_survey_form4.54842.46
WPrequal Settings /wp-admin/admin.php?page=wprequal_options4.48802.29
Export Leads /wp-admin/admin.php?page=export-leads4.50918.11
Register Forms /wp-admin/edit.php?post_type=wpq_register_form4.55775.52
Leads /wp-admin/edit.php?post_type=wprequal_lead4.55752.16
Contact Forms /wp-admin/edit.php?post_type=wpq_contact_form4.55795.31

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

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

Browser metrics Passed 4 tests

Mortgage Lead Capture System: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲15913.69 ▼0.6614.66 ▲12.8437.22 ▼7.05
Dashboard /wp-admin2,232 ▲525.52 ▼0.0186.84 ▼2.5082.68 ▲41.24
Posts /wp-admin/edit.php2,155 ▲551.96 ▼0.0136.76 ▼2.2533.70 ▼0.98
Add New Post /wp-admin/post-new.php1,558 ▲3218.47 ▼4.70787.43 ▲52.1555.82 ▲2.23
Media Library /wp-admin/upload.php1,452 ▲554.20 ▲0.0293.90 ▼40.7677.29 ▲28.41
Survey Forms /wp-admin/edit.php?post_type=wpq_survey_form1,1161.9531.2631.37
WPrequal Settings /wp-admin/admin.php?page=wprequal_options9072.0125.3124.93
Export Leads /wp-admin/admin.php?page=export-leads8371.9923.3426.47
Register Forms /wp-admin/edit.php?post_type=wpq_register_form1,1161.9229.9529.05
Leads /wp-admin/edit.php?post_type=wprequal_lead1,1371.9932.5530.56
Contact Forms /wp-admin/edit.php?post_type=wpq_contact_form1,1201.9239.5940.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_wprequal_register_form
    • widget_wprequal
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wprequal_contact_form
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 124× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wprequal/views/calc/insurance.php
    • > /wp-content/plugins/wprequal/views/survey/admin/settings.php
    • > /wp-content/plugins/wprequal/views/contact/form/contact-form.php
    • > /wp-content/plugins/wprequal/views/contact/form/text.php
    • > /wp-content/plugins/wprequal/views/survey/admin/fa-select.php
    • > /wp-content/plugins/wprequal/views/contact/admin/inputs.php
    • > /wp-content/plugins/wprequal/views/contact/form/legend.php
    • > /wp-content/plugins/wprequal/views/survey/admin/text.php
    • > /wp-content/plugins/wprequal/views/survey/admin/icons.php
    • > /wp-content/plugins/wprequal/views/contact/form/checkbox.php
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/classes/class.Email.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/classes/class.RegisterFormAdmin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/abstracts/trait.Api.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/functions/update-notice.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/abstracts/class.PostType.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/classes/class.Calc.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/abstracts/class.Mail.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/classes/class.ContactFormAdmin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/functions/view.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPrequal\\wp_die() in wp-content/plugins/wprequal/includes/classes/class.SurveyFormAdmin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can look at the official readme.txt

wprequal/wprequal.php Passed 13 tests

The primary PHP file in "Mortgage Lead Capture System" version 8.2.4 is used by WordPress to initiate all plugin functionality
44 characters long description:
Mortgage and Real Estate Lead Capture System

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin68,130 lines of code in 226 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript282,2401,14325,675
Sass186,5012918,802
SVG50128,891
PHP1683,4473,5117,560
CSS22907,197
JSON5005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.19
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes30
▷ Abstract classes310.00%
▷ Concrete classes2790.00%
▷ Final classes00.00%
Methods289
▷ Static methods4415.22%
▷ Public methods27996.54%
▷ Protected methods00.00%
▷ Private methods103.46%
Functions26
▷ Named functions1765.38%
▷ Anonymous functions934.62%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/wprequal-logo.png2.59KB2.70KB0.00%
assets/img/icon.png0.83KB0.85KB0.00%
assets/img/raw/icon.png3.86KB0.85KB▼ 77.96%
assets/img/raw/wprequal-logo.png2.59KB2.70KB0.00%