83% ninja-mortgage-calculator

Code Review | Ninja Mortgage Calculator - The best Mortgage Plugin for WordPress

WordPress plugin Ninja Mortgage Calculator - The best Mortgage Plugin for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: ninja-mortgage-ca...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 25, 2018
  • Latest release: Mar 29, 2019
  • Number of updates: 4
  • Update frequency: every 46.8 days
  • Top authors: adreastrian (75%)techjewel (50%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Ninja Mortgage Calculator - The best Mortgage Plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.11 ▼14.20
Dashboard /wp-admin3.34 ▲0.0348.07 ▼0.05
Posts /wp-admin/edit.php3.39 ▲0.0346.33 ▲0.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.10 ▼18.18
Media Library /wp-admin/upload.php3.26 ▲0.0338.58 ▲6.34

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Ninja Mortgage Calculator - The best Mortgage Plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10113.59 ▼0.701.62 ▼0.2042.76 ▼1.27
Dashboard /wp-admin2,247 ▲595.83 ▲0.93103.74 ▼3.4039.66 ▲0.05
Posts /wp-admin/edit.php2,136 ▲472.01 ▼0.0339.23 ▲2.5235.92 ▼2.64
Add New Post /wp-admin/post-new.php1,524 ▼1817.93 ▼4.85674.14 ▲18.5651.81 ▼0.32
Media Library /wp-admin/upload.php1,438 ▲564.21 ▼0.0297.71 ▼1.4141.28 ▼0.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ninja-mortgage-calculator/views/admin_view.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #5 (Admin Panel Index), #7 (Calculator Default Value Editor)
  • Requires php: Version format is invalid
The official readme.txt might help

ninja-mortgage-calculator/ninja-mortgage-calculator.php 85% from 13 tests

The primary PHP file in "Ninja Mortgage Calculator - The best Mortgage Plugin for WordPress" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
No dangerous file extensions were detected15,931 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JSON30011,863
Vuejs Component14217122,949
PHP811518505
Sass3785484
JavaScript6160112
SVG11015
CSS3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods2076.92%
▷ Public methods2492.31%
▷ Protected methods00.00%
▷ Private methods27.69%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin