56% smart-loan-calculator

Code Review | Smart Loan Calculator

WordPress plugin Smart Loan Calculator scored 56% from 54 tests.

About plugin

  • Plugin page: smart-loan-calcul...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 17, 2023
  • Latest release: Sep 7, 2023
  • Number of updates: 23
  • Update frequency: every 13.2 days
  • Top authors: hayyatapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 393 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.95MB] [CPU: ▼32.30ms] Passed 4 tests

A check of server-side resources used by Smart Loan Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.37 ▼5.59
Dashboard /wp-admin3.00 ▼0.3122.78 ▼26.66
Posts /wp-admin/edit.php3.00 ▼0.3623.78 ▼23.08
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.21 ▼65.18
Media Library /wp-admin/upload.php3.00 ▼0.2321.31 ▼14.29
Support /wp-admin/admin.php?page=SupportSLC3.0022.12
Settings /wp-admin/admin.php?page=SLC_ManageSheets3.0021.02
Smart Loan Calculator LITE /wp-admin/admin.php?page=MAINMENUSLC3.0018.52
Get Pro /wp-admin/admin.php?page=SLC_upgrade3.0021.73

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

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

Browser metrics Passed 4 tests

Smart Loan Calculator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.21 ▼1.301.78 ▼0.1537.12 ▼7.34
Dashboard /wp-admin2,245 ▲574.85 ▼1.05106.25 ▼10.8639.15 ▼5.36
Posts /wp-admin/edit.php2,131 ▲422.03 ▲0.0239.80 ▲5.4534.99 ▼0.45
Add New Post /wp-admin/post-new.php1,560 ▲4623.36 ▲5.81647.09 ▲3.4349.81 ▼3.04
Media Library /wp-admin/upload.php1,424 ▲364.16 ▼0.0798.59 ▲1.2143.30 ▼0.75
Support /wp-admin/admin.php?page=SupportSLC9251.7725.1247.72
Settings /wp-admin/admin.php?page=SLC_ManageSheets1,5713.7348.7159.32
Smart Loan Calculator LITE /wp-admin/admin.php?page=MAINMENUSLC8351.7927.8638.47
Get Pro /wp-admin/admin.php?page=SLC_upgrade8001.7626.1633.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SLC_upgrade
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php
    • > /wp-content/plugins/smart-loan-calculator/Pages/pro.php
    • > /wp-content/plugins/smart-loan-calculator/Pages/activation.php
    • > /wp-content/plugins/smart-loan-calculator/APP/index.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-loan-calculator/SLC.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/smart-loan-calculator/Pages/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/smart-loan-calculator/Pages/home.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/smart-loan-calculator/Pages/support.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 66 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 72 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 144 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 151 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 158 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 178 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 185 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 192 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 214 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=SLC_ManageSheets
    • > Rendering (warning) in unknown
    /wp-content/plugins/smart-loan-calculator/APP/Admin/index.php 247 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: loan amortization calculator, loan repayment calculator, loan calculator, loan payoff calculator, interest calculator...

smart-loan-calculator/SLC.php 77% from 13 tests

The main PHP script in "Smart Loan Calculator" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("smart-loan-calculator.php" instead of "SLC.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

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 plugin23,690 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript155,1623,95120,714
CSS10297812,402
PHP1122126570
SVG4004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
APP/JS/date/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
APP/JS/date/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%