84% income-tax-calculator-india

Code Review | Income Tax Calculator (India)

WordPress plugin Income Tax Calculator (India) scored84%from 54 tests.

About plugin

  • Plugin page: income-tax-calcul...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 6.3.1
  • First release: Jul 21, 2013
  • Latest release: Jul 17, 2014
  • Number of updates: 19
  • Update frequency: every 19.0 days
  • Top authors: wbxpress (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,269 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
Installer ran successfully

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

Server-side resources used by Income Tax Calculator (India)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.73 ▼0.35
Dashboard /wp-admin3.31 ▲0.0043.21 ▼1.84
Posts /wp-admin/edit.php3.36 ▲0.0046.38 ▲0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.43 ▼11.92
Media Library /wp-admin/upload.php3.23 ▲0.0034.44 ▲1.86

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Income Tax Calculator (India)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▼0.271.69 ▲0.0044.39 ▲4.98
Dashboard /wp-admin2,198 ▲205.62 ▲0.0381.54 ▼20.9538.94 ▼3.17
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0138.43 ▼3.4135.80 ▲1.24
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▼0.03633.51 ▼50.4555.78 ▼3.48
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.01106.14 ▲7.5048.26 ▲3.78

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/income-tax-calculator-india/Taxcalculator.php:18

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Default appearance) image required
Please take inspiration from this readme.txt

income-tax-calculator-india/Taxcalculator.php 92% from 13 tests

The main PHP file in "Income Tax Calculator (India)" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("income-tax-calculator-india.php" instead of "Taxcalculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected815 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25415815

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.00KB6.53KB▼ 65.63%