78% inc-compound-interest-calculator

Code Review | Interest Calculator (LOAN, SIP, FD, BANK)

WordPress plugin Interest Calculator (LOAN, SIP, FD, BANK) scored78%from 54 tests.

About plugin

  • Plugin page: inc-compound-inte...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Jan 9, 2023
  • Number of updates: 12
  • Update frequency: every 2.3 days
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /563 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.27ms] Passed 4 tests

Server-side resources used by Interest Calculator (LOAN, SIP, FD, BANK)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.1747.38 ▼1.11
Dashboard /wp-admin3.71 ▲0.0853.97 ▼16.09
Posts /wp-admin/edit.php3.76 ▲0.0856.79 ▲3.53
Add New Post /wp-admin/post-new.php6.25 ▲0.1094.95 ▼8.47
Media Library /wp-admin/upload.php3.57 ▲0.0842.95 ▲0.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_cicw_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Interest Calculator (LOAN, SIP, FD, BANK)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲19314.13 ▼0.1014.74 ▲12.7247.84 ▲4.50
Dashboard /wp-admin2,232 ▲555.80 ▲0.1390.67 ▼13.1340.56 ▼3.57
Posts /wp-admin/edit.php2,142 ▲422.29 ▲0.2838.75 ▲0.3932.44 ▼3.00
Add New Post /wp-admin/post-new.php1,555 ▲2423.29 ▲0.23690.83 ▲11.6437.46 ▼21.58
Media Library /wp-admin/upload.php1,440 ▲434.47 ▲0.22101.17 ▼18.9744.79 ▼4.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_cicw_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/inc-compound-interest-calculator/admin/partials/compound-interest-calculator-admin-display.php
    • > /wp-content/plugins/inc-compound-interest-calculator/public/partials/compound-interest-calculator-public-display.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/inc-compound-interest-calculator/admin/setting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/inc-compound-interest-calculator/public/cicw-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/inc-compound-interest-calculator/public/class-cicw-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/inc-compound-interest-calculator/public/cicw_setting.php:5

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

inc-compound-interest-calculator/compound-interest-calculator.php 85% from 13 tests

"Interest Calculator (LOAN, SIP, FD, BANK)" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("inc-compound-interest-calculator.php" instead of "compound-interest-calculator.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
Good job! No executable or dangerous file extensions detected861 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP18151562505
CSS2276167
JavaScript32829165
Markdown110024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin