10% ontario-hst-calculator

Code Review | Ontario HST Calculator

WordPress plugin Ontario HST Calculator scored10%from 54 tests.

About plugin

  • Plugin page: ontario-hst-calcu...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2014
  • Latest release: Jul 26, 2023
  • Number of updates: 22
  • Update frequency: every 142.7 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,336 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ontario-hst-calculator/cc-ontario-hst-calculator.php+132
    Function create_function() is deprecated

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.77ms] Passed 4 tests

Analyzing server-side resources used by Ontario HST Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.386.82 ▼34.62
Dashboard /wp-admin2.10 ▼1.255.50 ▼54.09
Posts /wp-admin/edit.php2.10 ▼1.266.08 ▼41.25
Add New Post /wp-admin/post-new.php2.10 ▼3.796.23 ▼89.12
Media Library /wp-admin/upload.php2.10 ▼1.135.92 ▼30.01

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_cc_ontario_hst_calculator
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Ontario HST Calculator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.58 ▼0.797.95 ▲6.0641.67 ▼1.08
Dashboard /wp-admin2,228 ▲435.14 ▼0.71103.79 ▼3.5938.99 ▼2.84
Posts /wp-admin/edit.php2,113 ▲242.34 ▲0.3435.83 ▼6.5130.63 ▼7.82
Add New Post /wp-admin/post-new.php1,528 ▼921.54 ▼1.71672.25 ▲65.1538.51 ▼18.03
Media Library /wp-admin/upload.php1,410 ▲224.58 ▲0.34101.30 ▼0.0542.55 ▼0.88

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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ontario-hst-calculator/cc-ontario-hst-calculator.php+132
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_cc_ontario_hst_calculator

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 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/ontario-hst-calculator/cc-ontario-hst-calculator.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

ontario-hst-calculator/cc-ontario-hst-calculator.php 92% from 13 tests

This is the main PHP file of "Ontario HST Calculator" version 0.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ontario-hst-calculator.php" instead of "cc-ontario-hst-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 detected357 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24137153
JavaScript2325109
CSS118195

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ 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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin