10% singapore-mortgage-and-loan-calculator

Code Review | Singapore Mortgage And Loan Calculator

WordPress plugin Singapore Mortgage And Loan Calculator scored 10% from 54 tests.

About plugin

  • Plugin page: singapore-mortgag...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Aug 16, 2016
  • Number of updates: 11
  • Update frequency: every 0.7 days
  • Top authors: weiqiang87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,005 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/singapore-mortgage-and-loan-calculator/ecsg-loan-calculator.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; ECSGLoanCalculator_Widget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.47ms] Passed 4 tests

This is a short check of server-side resources used by Singapore Mortgage And Loan Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.72 ▼41.55
Dashboard /wp-admin2.08 ▼1.236.14 ▼46.35
Posts /wp-admin/edit.php2.08 ▼1.285.79 ▼51.69
Add New Post /wp-admin/post-new.php2.08 ▼3.816.78 ▼94.27
Media Library /wp-admin/upload.php2.08 ▼1.155.62 ▼32.57

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_ecsgloancalculator_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Singapore Mortgage And Loan Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲20214.30 ▲1.1313.00 ▲7.7073.03 ▲31.66
Dashboard /wp-admin2,206 ▼04.88 ▲0.03107.79 ▼0.4644.60 ▲2.02
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0443.21 ▲3.4738.67 ▲2.68
Add New Post /wp-admin/post-new.php1,541 ▲818.07 ▼5.44628.29 ▼117.7354.23 ▼14.14
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0396.98 ▼7.8239.88 ▼4.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/singapore-mortgage-and-loan-calculator/ecsg-loan-calculator.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; ECSGLoanCalculator_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_ecsgloancalculator_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
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/singapore-mortgage-and-loan-calculator/ecsg-loan-calculator.php:13

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: repayment, banks, singapore, mortgage, home...

singapore-mortgage-and-loan-calculator/ecsg-loan-calculator.php 92% from 13 tests

The principal PHP file in "Singapore Mortgage And Loan Calculator" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("singapore-mortgage-and-loan-calculator.php" instead of "ecsg-loan-calculator.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 plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19638

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.05
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 methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin