89% emi-loan-calculator

Code Review | Emi Loan Calculator

WordPress plugin Emi Loan Calculator scored89%from 54 tests.

About plugin

  • Plugin page: emi-loan-calculator
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 9
  • Update frequency: every 132.7 days
  • Top authors: piyushmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,479 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.32ms] Passed 4 tests

This is a short check of server-side resources used by Emi Loan Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0156.30 ▲18.38
Dashboard /wp-admin3.31 ▲0.0044.02 ▼10.56
Posts /wp-admin/edit.php3.36 ▲0.0046.93 ▲3.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.69 ▼6.76
Media Library /wp-admin/upload.php3.23 ▲0.0034.04 ▲0.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Emi Loan Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.62 ▼0.6820.50 ▲18.3846.17 ▲7.58
Dashboard /wp-admin2,209 ▲214.87 ▼0.9997.77 ▼3.5838.61 ▼6.73
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.75 ▲3.4235.99 ▲3.09
Add New Post /wp-admin/post-new.php1,542 ▲1918.22 ▼4.85590.51 ▼86.3549.90 ▼3.40
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0795.48 ▼1.8841.57 ▲0.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Loan Calculator Demo Shortcode [Loan-calculator]) image required
You can take inspiration from this readme.txt

emi-loan-calculator/index.php 92% from 13 tests

This is the main PHP file of "Emi Loan Calculator" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("emi-loan-calculator.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin6,827 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41175,094
CSS225431,395
PHP382113301
PO File191237

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity5.90
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
23 PNG files occupy 0.17MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/radio_deselect.png50.00KB0.20KB▼ 99.60%
assets/img/slider.png0.96KB0.12KB▼ 88.01%
assets/img/chart_arrow_left.png1.00KB0.14KB▼ 85.76%
assets/img/email-icon.png0.36KB0.20KB▼ 44.50%
assets/img/slider-handle.png0.95KB0.12KB▼ 87.15%