77% mortgagea-calculator

Code Review | Mortgage Calculator

WordPress plugin Mortgage Calculator scored77%from 54 tests.

About plugin

  • Plugin page: mortgagea-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Jun 8, 2023
  • Number of updates: 3
  • Update frequency: every 25.7 days
  • Top authors: mgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /124 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Mortgage Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.1551.51 ▲6.79
Dashboard /wp-admin3.69 ▲0.1356.97 ▼1.07
Posts /wp-admin/edit.php3.81 ▲0.1354.32 ▲2.53
Add New Post /wp-admin/post-new.php6.29 ▲0.1586.54 ▼13.67
Media Library /wp-admin/upload.php3.62 ▲0.1341.62 ▲2.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Mortgage Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15414.22 ▼0.0723.48 ▲21.6545.71 ▲4.43
Dashboard /wp-admin2,233 ▲565.83 ▲0.15100.67 ▲0.1741.67 ▼6.22
Posts /wp-admin/edit.php2,143 ▲462.48 ▲0.4840.09 ▲3.9432.75 ▼4.75
Add New Post /wp-admin/post-new.php1,557 ▲1218.00 ▼5.17707.01 ▼4.2937.58 ▼18.69
Media Library /wp-admin/upload.php1,438 ▲384.49 ▲0.28106.28 ▼5.7148.83 ▼0.21

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/mortgagea-calculator/mortgage-calculator.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mortgagea-calculator/inc/wmc_fronted.php:232
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mortgagea-calculator/inc/wmc_backend.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in mortgagea-calculator/assets to your readme.txt
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

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

Analyzing the main PHP file in "Mortgage Calculator" version 1.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mortgagea-calculator.php" instead of "mortgage-calculator.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,656 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4103257716
PHP34011681
CSS234259

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected