79% eh-mortgage-calculator

Code Review | EH Mortgage Calculator

WordPress plugin EH Mortgage Calculator scored79%from 54 tests.

About plugin

  • Plugin page: eh-mortgage-calcu...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Apr 6, 2016
  • Number of updates: 11
  • Update frequency: every 19.3 days
  • Top authors: edgarr41 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,348 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.79ms] Passed 4 tests

A check of server-side resources used by EH Mortgage Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.35 ▲2.70
Dashboard /wp-admin3.35 ▲0.0043.51 ▼9.15
Posts /wp-admin/edit.php3.46 ▲0.1145.25 ▲5.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.54 ▼21.90
Media Library /wp-admin/upload.php3.27 ▲0.0435.54 ▲5.21

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EH Mortgage Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.24 ▼1.111.91 ▲0.1247.16 ▲3.81
Dashboard /wp-admin2,206 ▲184.87 ▼0.9895.12 ▼10.8037.98 ▼2.51
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0739.51 ▼0.6134.66 ▼6.15
Add New Post /wp-admin/post-new.php1,528 ▼023.08 ▲4.95686.34 ▲34.3754.60 ▼8.68
Media Library /wp-admin/upload.php1,388 ▼04.24 ▼0.0293.96 ▼5.3343.95 ▼1.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_ehmortgagecalculator_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/eh-mortgage-calculator/eh-mortgage-calculator.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/eh-mortgage-calculator/class.ehmortgagecalculator-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: real estate, widget, loan, mortgage, calculator...

eh-mortgage-calculator/eh-mortgage-calculator.php Passed 13 tests

The entry point to "EH Mortgage Calculator" version 2.0 is a PHP file that has certain tags in its header comment area
83 characters long description:
EH Mortgage Calculator is a simple plugin designed to calculate a mortgage payment.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin502 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File47074200
PHP434106166
JavaScript13016135
CSS1041

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.67
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin