83% sc-loan-calculation-widget

Code Review | SC-Loan Calculation Widget

WordPress plugin SC-Loan Calculation Widget scored 83% from 54 tests.

About plugin

  • Plugin page: sc-loan-calculati...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2021
  • Latest release: Jun 16, 2023
  • Number of updates: 13
  • Update frequency: every 52.3 days
  • Top authors: smartcredit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.09ms] Passed 4 tests

A check of server-side resources used by SC-Loan Calculation Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.04 ▼1.59
Dashboard /wp-admin3.32 ▲0.0147.96 ▲0.10
Posts /wp-admin/edit.php3.37 ▲0.0145.94 ▼3.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.58 ▼7.16
Media Library /wp-admin/upload.php3.24 ▲0.0136.27 ▲0.01

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

SC-Loan Calculation Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9917.92 ▲3.5433.79 ▲32.1237.52 ▼11.60
Dashboard /wp-admin2,203 ▲156.01 ▲1.1499.03 ▼14.5337.24 ▼1.97
Posts /wp-admin/edit.php2,068 ▼212.01 ▼0.0035.08 ▼1.7829.08 ▼2.15
Add New Post /wp-admin/post-new.php1,533 ▼923.17 ▲4.93671.57 ▲26.5064.86 ▼39.46
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0399.81 ▼4.6244.83 ▼2.22

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sc-loan-calculation-widget/SC-LoanCalculation-plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === sc-loan-calculation-widget === )
The official readme.txt is a good inspiration

sc-loan-calculation-widget/SC-LoanCalculation-plugin.php 77% from 13 tests

Analyzing the main PHP file in "SC-Loan Calculation Widget" version 1.0.11
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 228 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sc-loan-calculation-widget.php" instead of "SC-LoanCalculation-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin46 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3234243
JavaScript1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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