62% home-affordability-calculator

Code Review | Home Affordability Calculator

WordPress plugin Home Affordability Calculator scored62%from 54 tests.

About plugin

  • Plugin page: home-affordabilit...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2022
  • Latest release: Apr 8, 2023
  • Number of updates: 17
  • Update frequency: every 10.4 days
  • Top authors: hayyatapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /948 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.93MB] [CPU: ▼39.50ms] Passed 4 tests

Server-side resources used by Home Affordability Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.73 ▼2.07
Dashboard /wp-admin3.02 ▼0.3321.21 ▼41.84
Posts /wp-admin/edit.php3.02 ▼0.3424.49 ▼22.51
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.94 ▼80.79
Media Library /wp-admin/upload.php3.02 ▼0.2122.44 ▼12.84
Affordibility Calculator Lite /wp-admin/admin.php?page=MAINMENUWPBOXAFF3.0224.33
Support /wp-admin/admin.php?page=SupportWPBOXAFF3.0223.46
Go Pro /wp-admin/admin.php?page=WPBOXAFF_gopro3.0220.39
Settings /wp-admin/admin.php?page=WPBOXAFF_settings3.0223.11
PDF & Email /wp-admin/admin.php?page=WPBOXAFF_pdf3.0222.53
View Leads /wp-admin/admin.php?page=WPBOXAFF_leads3.0225.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Home Affordability Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.77 ▼0.971.81 ▲0.0242.73 ▼1.00
Dashboard /wp-admin2,292 ▲1045.16 ▼0.71129.69 ▲10.4938.94 ▼4.67
Posts /wp-admin/edit.php2,183 ▲942.27 ▲0.2346.82 ▲12.1434.51 ▼4.61
Add New Post /wp-admin/post-new.php1,574 ▲3218.55 ▼4.68657.05 ▼1.9237.81 ▼16.63
Media Library /wp-admin/upload.php1,479 ▲914.33 ▲0.15108.19 ▲3.0540.78 ▼4.40
Affordibility Calculator Lite /wp-admin/admin.php?page=MAINMENUWPBOXAFF8611.9731.7735.07
Support /wp-admin/admin.php?page=SupportWPBOXAFF9011.9831.7131.64
Go Pro /wp-admin/admin.php?page=WPBOXAFF_gopro8961.9027.9844.80
Settings /wp-admin/admin.php?page=WPBOXAFF_settings2,7772.0338.4259.02
PDF & Email /wp-admin/admin.php?page=WPBOXAFF_pdf1,0422.0331.5539.84
View Leads /wp-admin/admin.php?page=WPBOXAFF_leads8921.9831.8631.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=WPBOXAFF_leads
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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
The following issues need your attention
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/home-affordability-calculator/Pages/pro.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/leads.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/customize/4-funds.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/customize/5-finance.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/json.php
    • > /wp-content/plugins/home-affordability-calculator/lib/steps/2.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/customize/1-income.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/pdf.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/activation.php
    • > /wp-content/plugins/home-affordability-calculator/Pages/customize/2-m-debts.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hac_get_head() in wp-content/plugins/home-affordability-calculator/Pages/settings.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/home-affordability-calculator/Pages/support.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/home-affordability-calculator/Home-Affordability-Calculator.php:30
    • > PHP Warning
      include(wp-content/plugins/home-affordability-calculator/lib/main-css.php): failed to open stream: No such file or directory in wp-content/plugins/home-affordability-calculator/lib/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPBOXAFF_appi() in wp-content/plugins/home-affordability-calculator/lib/steps/1.php:28
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/home-affordability-calculator/lib/main-css.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/home-affordability-calculator/lib/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPBOXAFF_appi() in wp-content/plugins/home-affordability-calculator/lib/steps/1.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: web calculator, home affordability calculator

home-affordability-calculator/Home-Affordability-Calculator.php 77% from 13 tests

The main PHP script in "Home Affordability Calculator" version 1.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("home-affordability-calculator.php" instead of "Home-Affordability-Calculator.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,323 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS6177731,713
PHP2141538981
JavaScript9106625
SVG4004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
JS/tipx/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
JS/tipx/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
Pages/icons/email-support.png10.72KB5.44KB▼ 49.27%