84% mortgage-rates

Code Review | Mortgage Rates

WordPress plugin Mortgage Rates scored84%from 54 tests.

About plugin

  • Plugin page: mortgage-rates
  • Plugin version: 1.3.11
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1-6.3.0
  • WordPress version: 6.3.1
  • First release: Jan 26, 2010
  • Latest release: Jul 22, 2023
  • Number of updates: 100
  • Update frequency: every 49.3 days
  • Top authors: mlcalc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /14,883 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
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼15.65ms] Passed 4 tests

Analyzing server-side resources used by Mortgage Rates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0338.29 ▼27.78
Dashboard /wp-admin3.31 ▲0.0045.96 ▼10.76
Posts /wp-admin/edit.php3.36 ▼0.4947.00 ▼8.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.70 ▼15.76
Media Library /wp-admin/upload.php3.23 ▲0.0033.33 ▼2.32

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Mortgage Rates: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.144.26 ▲2.3040.96 ▼3.91
Dashboard /wp-admin2,206 ▲154.86 ▼0.20109.18 ▲4.9038.22 ▼4.16
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0138.43 ▼1.6734.48 ▼1.11
Add New Post /wp-admin/post-new.php1,534 ▲623.00 ▲0.08589.94 ▼32.9449.22 ▼0.75
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.1592.62 ▼7.0341.85 ▼0.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mortgage-rates/mlcalc_rates.php:38
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mortgage-rates/form-narrow.inc.php on line 1
    • > PHP Notice
      Undefined variable: SECTION in wp-content/plugins/mortgage-rates/form-narrow.inc.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mortgage-rates/form-narrow.inc.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mortgage-rates/form-wide.inc.php:1
    • > PHP Notice
      Undefined variable: SECTION in wp-content/plugins/mortgage-rates/form-wide.inc.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mortgage-rates/form-wide.inc.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

mortgage-rates/mlcalc_rates.php 92% from 13 tests

The primary PHP file in "Mortgage Rates" version 1.3.11 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mortgage-rates.php" instead of "mlcalc_rates.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected225 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32761112
JavaScript1163661
CSS29052

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right-bg.png0.20KB0.12KB▼ 40.69%
images/left-bg.png0.20KB0.12KB▼ 41.26%
images/bottom-small.png0.65KB0.54KB▼ 17.10%
images/top-small.png0.54KB0.53KB▼ 1.80%
images/arrows.png0.12KB0.12KB▼ 1.60%