84% mobile-friendly-mortgage-calculator

Code Review | Mortgage Calculator

WordPress plugin Mortgage Calculator scored84%from 54 tests.

About plugin

  • Plugin page: mobile-friendly-m...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 30, 2018
  • Latest release: Sep 30, 2018
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: mortgageadviceonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼13.27ms] Passed 4 tests

Analyzing server-side resources used by Mortgage Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.49 ▼1.77
Dashboard /wp-admin3.34 ▼0.0045.82 ▼14.44
Posts /wp-admin/edit.php3.39 ▲0.0442.64 ▼11.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.67 ▼25.30
Media Library /wp-admin/upload.php3.27 ▲0.0434.65 ▼1.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_maocalc_widget
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mortgage Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▼0.021.68 ▼0.3546.70 ▼0.75
Dashboard /wp-admin2,195 ▲155.64 ▲0.0284.05 ▼2.6637.23 ▼5.98
Posts /wp-admin/edit.php2,097 ▼61.98 ▼0.0637.11 ▼5.9530.96 ▼8.72
Add New Post /wp-admin/post-new.php1,535 ▲918.12 ▼4.96602.75 ▼26.4378.42 ▼24.80
Media Library /wp-admin/upload.php1,394 ▼04.28 ▲0.0894.45 ▼10.5541.36 ▼3.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_maocalc_widget
    • widget_recent-posts
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mobile-friendly-mortgage-calculator/mao_widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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: You can take inspiration from this readme.txt

mobile-friendly-mortgage-calculator/mao_widget.php 92% from 13 tests

"Mortgage Calculator" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mobile-friendly-mortgage-calculator.php" instead of "mao_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin10,777 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52,2492,22910,663
PHP12533114

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin