10% cc-ontario-tax-calculator

Code Review | CC Ontario Income Tax Calculator

WordPress plugin CC Ontario Income Tax Calculator scored10%from 54 tests.

About plugin

  • Plugin page: cc-ontario-tax-ca...
  • Plugin version: 0.2021.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Jul 26, 2023
  • Number of updates: 65
  • Update frequency: every 53.1 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,191 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/cc-ontario-tax-calculator/cc-income-tax-on.php+127
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼47.79ms] Passed 4 tests

A check of server-side resources used by CC Ontario Income Tax Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.80 ▼28.29
Dashboard /wp-admin2.05 ▼1.265.76 ▼37.75
Posts /wp-admin/edit.php2.05 ▼1.315.58 ▼39.36
Add New Post /wp-admin/post-new.php2.05 ▼3.845.17 ▼85.75
Media Library /wp-admin/upload.php2.05 ▼1.184.57 ▼26.64

Server storage [IO: ▲0.08MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for CC Ontario Income Tax Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲16713.72 ▼0.636.31 ▲4.5741.43 ▲0.29
Dashboard /wp-admin2,225 ▲375.04 ▼0.85103.58 ▼16.3940.26 ▼3.72
Posts /wp-admin/edit.php2,113 ▲242.29 ▲0.2840.17 ▲4.2831.91 ▲1.59
Add New Post /wp-admin/post-new.php1,528 ▼523.44 ▲0.05596.33 ▼108.3533.13 ▼32.60
Media Library /wp-admin/upload.php1,407 ▲164.45 ▲0.2897.39 ▲2.4542.68 ▲1.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/cc-ontario-tax-calculator/cc-income-tax-on.php+127
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_cc_income_tax_on
    • db_upgraded
    • 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)
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cc-ontario-tax-calculator/cc-income-tax-on.php:29

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: financial, calculator, plugin, income tax calculator, canada...

cc-ontario-tax-calculator/cc-income-tax-on.php 92% from 13 tests

"CC Ontario Income Tax Calculator" version 0.2021.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cc-ontario-tax-calculator.php" instead of "cc-income-tax-on.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin403 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23731195
JavaScript2268131
CSS113077

PHP code Passed 2 tests

A short 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.21
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png11.87KB6.87KB▼ 42.12%
screenshot-4.png20.46KB9.52KB▼ 53.50%
screenshot-2.png9.51KB5.69KB▼ 40.14%
screenshot-1.png17.33KB8.09KB▼ 53.30%