78% loan-mortgage-calculator-pro

Code Review | Loan & Mortgage Calculator Pro

WordPress plugin Loan & Mortgage Calculator Pro scored78%from 54 tests.

About plugin

  • Plugin page: loan-mortgage-cal...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2019
  • Latest release: Feb 8, 2019
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: tekkiwebsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /801 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼3.48ms] Passed 4 tests

An overview of server-side resources used by Loan & Mortgage Calculator Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.96 ▲0.91
Dashboard /wp-admin3.31 ▲0.0145.66 ▼2.16
Posts /wp-admin/edit.php3.36 ▲0.0143.28 ▼1.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.13 ▼7.54
Media Library /wp-admin/upload.php3.24 ▲0.0134.03 ▼2.63

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loan & Mortgage Calculator Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.96 ▼0.3211.60 ▲9.9255.68 ▲14.28
Dashboard /wp-admin2,206 ▲184.89 ▼0.03111.44 ▼1.8041.03 ▲0.21
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0236.72 ▲0.3832.90 ▼1.66
Add New Post /wp-admin/post-new.php1,534 ▲123.33 ▲0.09650.16 ▼24.5561.03 ▼0.22
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0696.87 ▼11.0340.55 ▼2.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/loan-mortgage-calculator-pro/includes/form.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/loan-mortgage-calculator-pro/lmcpcalc.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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: You can look at the official readme.txt

loan-mortgage-calculator-pro/lmcpcalc.php 85% from 13 tests

The principal PHP file in "Loan & Mortgage Calculator Pro" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("loan-mortgage-calculator-pro.php" instead of "lmcpcalc.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin4,252 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript245103,833
CSS13112246
PHP31715173

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.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin