10% canadian-gst-calculator

Code Review | CC Canadian GST Calculator

WordPress plugin CC Canadian GST Calculator scored10%from 54 tests.

About plugin

  • Plugin page: canadian-gst-calc...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Jul 26, 2023
  • Number of updates: 23
  • Update frequency: every 136.4 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,470 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/canadian-gst-calculator/cc-canada-gst-calculator.php+132
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼49.62ms] Passed 4 tests

This is a short check of server-side resources used by CC Canadian GST Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.11 ▼33.72
Dashboard /wp-admin2.10 ▼1.205.50 ▼41.60
Posts /wp-admin/edit.php2.10 ▼1.266.14 ▼38.85
Add New Post /wp-admin/post-new.php2.10 ▼3.795.50 ▼84.29
Media Library /wp-admin/upload.php2.10 ▼1.135.64 ▼27.01

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

Analyzing filesystem and database footprints of this plugin
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_recent-comments
can_compress_scripts
db_upgraded
widget_cc_canada_gst_calculator
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CC Canadian GST Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲13113.84 ▼0.755.34 ▲3.6040.25 ▼1.46
Dashboard /wp-admin2,225 ▲345.08 ▲0.20112.19 ▲7.3542.56 ▲1.33
Posts /wp-admin/edit.php2,110 ▲212.33 ▲0.3242.32 ▲3.8934.59 ▲4.49
Add New Post /wp-admin/post-new.php1,537 ▲1818.58 ▼4.64620.80 ▼35.3733.63 ▼18.22
Media Library /wp-admin/upload.php1,401 ▲134.57 ▲0.25100.11 ▼0.1144.03 ▼0.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/canadian-gst-calculator/cc-canada-gst-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
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_cc_canada_gst_calculator
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/canadian-gst-calculator/cc-canada-gst-calculator.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: canada, gst calculator, calculator, plugin, financial...

canadian-gst-calculator/cc-canada-gst-calculator.php 92% from 13 tests

Analyzing the main PHP file in "CC Canadian GST Calculator" version 0.2.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("canadian-gst-calculator.php" instead of "cc-canada-gst-calculator.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
There were no executable files found in this plugin357 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24137153
JavaScript2339109
CSS118195

PHP code Passed 2 tests

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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin