84% fc-loan-calculator

Code Review | FC's Loan Calculator

WordPress plugin FC's Loan Calculator scored84%from 54 tests.

About plugin

  • Plugin page: fc-loan-calculator
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2016
  • Latest release: Mar 31, 2023
  • Number of updates: 61
  • Update frequency: every 38.0 days
  • Top authors: karl53 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /0 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by FC's Loan Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1441.95 ▼0.08
Dashboard /wp-admin3.49 ▲0.1046.22 ▼17.87
Posts /wp-admin/edit.php3.54 ▲0.1451.69 ▲3.11
Add New Post /wp-admin/post-new.php6.07 ▲0.1486.42 ▼14.31
Media Library /wp-admin/upload.php3.41 ▲0.1439.88 ▲5.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
fcloancalc_plugin
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for FC's Loan Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.74 ▲0.631.62 ▲0.0342.44 ▲1.78
Dashboard /wp-admin2,195 ▲155.61 ▼0.0791.17 ▲5.4242.86 ▲3.63
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0440.09 ▲1.0936.76 ▼0.75
Add New Post /wp-admin/post-new.php1,536 ▲822.89 ▼0.23669.62 ▼12.5156.77 ▼2.94
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.05100.79 ▼2.0243.24 ▼1.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • fcloancalc_plugin

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/fc-loan-calculator/en/calculator.gui.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fc-loan-calculator/fc-loan-calculator.php:95
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/fc-loan-calculator/en/calculator.gui.php:22
    • > PHP Notice
      Undefined variable: date_mask in wp-content/plugins/fc-loan-calculator/en/calculator.gui.php on line 4
    • > PHP Notice
      Undefined variable: brand_name in wp-content/plugins/fc-loan-calculator/en/calculator.gui.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

fc-loan-calculator/fc-loan-calculator.php 92% from 13 tests

"FC's Loan Calculator" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin14,742 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PO File142,1142,3385,342
JavaScript138041,1213,476
JSON14003,024
CSS73391281,874
PHP22531881,023
SVG1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Constants0
▷ Global constants00.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
No PNG files were detected