72% home-value

Code Review | Home Value

WordPress plugin Home Value scored72%from 54 tests.

About plugin

  • Plugin page: home-value
  • Plugin version: 3.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2017
  • Latest release: Aug 15, 2023
  • Number of updates: 83
  • Update frequency: every 29.0 days
  • Top authors: 8blocks (98.8%)edward_plainview (2.41%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /20,127 total downloads

Benchmarks

Plugin footprint 82% 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.50MB] [CPU: ▼4.30ms] 75% from 4 tests

Analyzing server-side resources used by Home Value
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 946.67ms on /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values)
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5441.31 ▲3.13
Dashboard /wp-admin3.82 ▲0.4847.88 ▼15.96
Posts /wp-admin/edit.php3.87 ▲0.5253.53 ▲6.55
Add New Post /wp-admin/post-new.php6.46 ▲0.5788.50 ▼9.14
Media Library /wp-admin/upload.php3.69 ▲0.4641.31 ▲4.79
Tags /wp-admin/edit-tags.php?taxonomy=8b_hv_lead_tag&post_type=8b_hv_lead3.8037.48
All Leads /wp-admin/edit.php?post_type=8b_hv_lead3.7940.41
Export /wp-admin/edit.php?post_type=8b_hv_lead&page=8b_hv_export3.6532.08
Settings /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values3.78946.67

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
home_values_plugin_version
home_values_emails
home_values_plugin_updated

Browser metrics Passed 4 tests

Home Value: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.44 ▼1.129.07 ▲7.5138.79 ▲0.39
Dashboard /wp-admin2,239 ▲675.51 ▼0.2388.06 ▼9.9338.41 ▼1.69
Posts /wp-admin/edit.php2,144 ▲411.99 ▼0.0440.15 ▼0.0337.64 ▲0.59
Add New Post /wp-admin/post-new.php1,564 ▲3823.30 ▼0.12644.58 ▼7.8063.47 ▲6.73
Media Library /wp-admin/upload.php1,444 ▲414.20 ▲0.0196.79 ▲1.6243.43 ▼2.31
Tags /wp-admin/edit-tags.php?taxonomy=8b_hv_lead_tag&post_type=8b_hv_lead1,2872.2826.7130.13
All Leads /wp-admin/edit.php?post_type=8b_hv_lead1,0841.9430.1529.74
Export /wp-admin/edit.php?post_type=8b_hv_lead&page=8b_hv_export8082.0424.4726.12
Settings /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values1,0241.9522.7626.79

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • home_values_plugin_version
    • theysaidso_admin_options
    • db_upgraded
    • home_values_emails
    • home_values_plugin_updated
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+73
    Undefined index: api_key
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+83
    Undefined index: next_refill_date
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+76
    Undefined index: credits
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+77
    Undefined index: renewal_url
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+80
    Undefined index: auto_refill_enabled
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+81
    Undefined index: credits_in_package
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+82
    Undefined index: credits_low
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+217
    Undefined index: google_api_key
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+227
    Undefined index: adjust_values
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+240
    Undefined index: load_css
    • > GET request to /wp-admin/edit.php?post_type=8b_hv_lead&page=home_values
    • > Notice in wp-content/plugins/home-value/admin/partials/home-values-general.php+247
    Undefined index: webhooks

SRP 0% from 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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/home-value/templates/forms/address-search-page.php
    • > /wp-content/plugins/home-value/templates/forms/comparables.php
    • > /wp-content/plugins/home-value/templates/lead-description.php
    • > /wp-content/plugins/home-value/templates/forms/lead-info-page.php
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/home-value/admin/partials/home-values-uninstall.php:2
    • > PHP Warning
      require_once(HOME_VALUES_PLUGIN_DIRincludes/class-home-values-api.php): failed to open stream: No such file or directory in wp-content/plugins/home-value/public/class-home-values-shortcodes.php on line 5
    • > PHP Notice
      Undefined variable: last_name_field_placeholder in wp-content/plugins/home-value/templates/forms/lead-form.php on line 9
    • > PHP Notice
      Undefined variable: first_name_field_placeholder in wp-content/plugins/home-value/templates/forms/lead-form.php on line 4
    • > PHP Notice
      Undefined variable: address_not_found_messaging in wp-content/plugins/home-value/templates/forms/lead-info-page.php on line 62
    • > PHP Notice
      Undefined variable: searched_address in wp-content/plugins/home-value/templates/lead-description.php on line 7
    • > PHP Notice
      Undefined variable: address_street_view in wp-content/plugins/home-value/templates/forms/lead-info-page.php on line 64
    • > PHP Notice
      Undefined variable: lead_last_name in wp-content/plugins/home-value/templates/lead-description.php on line 7
    • > PHP Warning
      Use of undefined constant HOME_VALUES_PLUGIN_DIR - assumed 'HOME_VALUES_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/home-value/public/class-home-values-shortcodes.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/home-value/templates/forms/comparables.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: home value, avm, real estate, home price evaluations

home-value/home-values.php 85% from 13 tests

Analyzing the main PHP file in "Home Value" version 3.1.5
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("home-value.php" instead of "home-values.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,324 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP285664312,914
JavaScript32514223
CSS22012110
XML140077

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 201)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity31.70
▷ Minimum class complexity1.00
▷ Maximum class complexity215.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity201.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods6385.14%
▷ Protected methods00.00%
▷ Private methods1114.86%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin