10% cc-mortgage-calculator

Code Review | CC Mortgage Calculator

WordPress plugin CC Mortgage Calculator scored 10% from 54 tests.

About plugin

  • Plugin page: cc-mortgage-calcu...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Jan 6, 2014
  • Latest release: Nov 11, 2021
  • Number of updates: 42
  • Update frequency: every 68.6 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 5,457 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/cc-mortgage-calculator/cc-mortgage.php+145
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼189.22ms] Passed 4 tests

An overview of server-side resources used by CC Mortgage Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼1.039.10 ▼20.99
Dashboard /wp-admin1.83 ▼1.235.98 ▼43.62
Posts /wp-admin/edit.php1.83 ▼1.285.54 ▼36.97
Add New Post /wp-admin/post-new.php1.83 ▼3.616.14 ▼647.88
Media Library /wp-admin/upload.php1.83 ▼1.185.35 ▼28.39

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_cc_mortgage

Browser metrics Passed 4 tests

CC Mortgage Calculator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,817 ▲22117.07 ▲1.7815.69 ▲3.3149.09 ▲6.13
Dashboard /wp-admin2,998 ▲676.62 ▲0.58153.99 ▼7.27114.77 ▲8.09
Posts /wp-admin/edit.php2,767 ▲283.01 ▲0.2966.61 ▼0.4083.21 ▼5.98
Add New Post /wp-admin/post-new.php1,543 ▼14018.63 ▲0.01391.44 ▼3.15107.38 ▲1.56
Media Library /wp-admin/upload.php1,776 ▼315.39 ▲0.34172.33 ▲20.60115.55 ▲0.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/cc-mortgage-calculator/cc-mortgage.php+145
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_cc_mortgage

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 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/cc-mortgage-calculator/cc-mortgage.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: mortgage, mortgage calculator, financial, widget, plugin...

cc-mortgage-calculator/cc-mortgage.php 92% from 13 tests

The main PHP script in "CC Mortgage Calculator" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cc-mortgage-calculator.php" instead of "cc-mortgage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin382 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24037196
JavaScript2385104
CSS113082

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected