10% cc-quebec-tax-calculator

Code Review | CC Quebec Income Tax Calculator

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

About plugin

  • Plugin page: cc-quebec-tax-cal...
  • Plugin version: 0.2021.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2014
  • Latest release: Jul 26, 2023
  • Number of updates: 39
  • Update frequency: every 88.1 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,801 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
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/cc-quebec-tax-calculator/cc-income-tax-qc.php+127
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼56.90ms] Passed 4 tests

An overview of server-side resources used by CC Quebec Income Tax Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.89 ▼37.60
Dashboard /wp-admin2.11 ▼1.205.71 ▼48.74
Posts /wp-admin/edit.php2.11 ▼1.255.69 ▼45.39
Add New Post /wp-admin/post-new.php2.11 ▼3.787.06 ▼95.88
Media Library /wp-admin/upload.php2.11 ▼1.129.10 ▼27.47

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CC Quebec Income Tax Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲13113.76 ▼0.626.81 ▲4.8739.59 ▼2.35
Dashboard /wp-admin2,222 ▲345.06 ▼0.75105.18 ▼5.6443.44 ▼2.58
Posts /wp-admin/edit.php2,113 ▲212.32 ▲0.2838.66 ▲1.9932.28 ▼5.13
Add New Post /wp-admin/post-new.php1,528 ▼823.37 ▼0.05681.33 ▲2.4837.19 ▼17.27
Media Library /wp-admin/upload.php1,407 ▲254.53 ▲0.29117.36 ▼3.8448.28 ▲0.60

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/cc-quebec-tax-calculator/cc-income-tax-qc.php+127
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_cc_income_tax_qc
    • 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 no errors were found, this is by no means 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cc-quebec-tax-calculator/cc-income-tax-qc.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
9 plugin tags: sidebar, plugin, taxes, quebec, widget...

cc-quebec-tax-calculator/cc-income-tax-qc.php 92% from 13 tests

This is the main PHP file of "CC Quebec Income Tax Calculator" version 0.2021.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cc-quebec-tax-calculator.php" instead of "cc-income-tax-qc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected383 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23631195
JavaScript22710111
CSS113077

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png8.69KB5.68KB▼ 34.66%
screenshot-4.png22.92KB10.75KB▼ 53.13%
screenshot-3.png10.88KB6.45KB▼ 40.72%
screenshot-2.png8.98KB5.16KB▼ 42.53%