84% awesome-gst-calculator-widget

Code Review | Awesome GST Calculator Widget

WordPress plugin Awesome GST Calculator Widget scored 84% from 54 tests.

About plugin

  • Plugin page: awesome-gst-calcu...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: May 23, 2023
  • Number of updates: 7
  • Update frequency: every 83.0 days
  • Top authors: anku1991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.16ms] Passed 4 tests

This is a short check of server-side resources used by Awesome GST Calculator Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.69 ▼3.04
Dashboard /wp-admin3.32 ▲0.0253.14 ▲6.80
Posts /wp-admin/edit.php3.37 ▲0.0251.57 ▲3.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.21 ▼2.46
Media Library /wp-admin/upload.php3.25 ▲0.0245.07 ▲11.76

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_wpgstcal_widget
theysaidso_admin_options
wpgstcal_enabled
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awesome GST Calculator Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲12913.76 ▼0.397.64 ▲5.6148.19 ▲4.63
Dashboard /wp-admin2,232 ▲234.95 ▼0.94125.24 ▲17.8280.10 ▲37.20
Posts /wp-admin/edit.php2,109 ▲202.05 ▲0.0141.18 ▲1.7239.04 ▲2.84
Add New Post /wp-admin/post-new.php1,688 ▲17422.39 ▲4.87857.10 ▲163.3578.58 ▲21.82
Media Library /wp-admin/upload.php1,399 ▲114.21 ▼0.03139.73 ▲26.50101.38 ▲54.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • wpgstcal_enabled
    • widget_theysaidso_widget
    • widget_wpgstcal_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-gst-calculator-widget/inc/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-gst-calculator-widget/inc/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/awesome-gst-calculator-widget/inc/general_functions.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

awesome-gst-calculator-widget/wp-gst-calculator.php 92% from 13 tests

The entry point to "Awesome GST Calculator Widget" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("awesome-gst-calculator-widget.php" instead of "wp-gst-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
No dangerous file extensions were detected363 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42926259
JavaScript125259
CSS11145

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.22
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.29MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-20x20.png1.68KB1.07KB▼ 35.90%
assets/screenshot-2.png39.29KB20.46KB▼ 47.93%
assets/screenshot-3.png86.37KB43.60KB▼ 49.51%
assets/screenshot-1.png174.18KB63.22KB▼ 63.71%