84% gst-for-woocommerce

Code Review | GST for WooCommerce

WordPress plugin GST for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: gst-for-woocommerce
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2023
  • Latest release: Jan 20, 2023
  • Number of updates: 19
  • Update frequency: N/A
  • Top authors: tmdwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.78ms] Passed 4 tests

Server-side resources used by GST for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.47 ▲0.17
Dashboard /wp-admin3.34 ▲0.0453.68 ▲3.16
Posts /wp-admin/edit.php3.39 ▲0.0452.64 ▲5.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.63 ▼7.84
Media Library /wp-admin/upload.php3.26 ▲0.0436.85 ▲1.40

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GST for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.29 ▲0.021.83 ▲0.1440.36 ▼2.13
Dashboard /wp-admin2,215 ▲355.58 ▼0.0784.45 ▼5.3043.36 ▲1.46
Posts /wp-admin/edit.php2,117 ▲172.03 ▲0.0337.56 ▲2.6334.18 ▼5.90
Add New Post /wp-admin/post-new.php1,540 ▲1423.21 ▲0.11677.79 ▲55.8755.39 ▲4.20
Media Library /wp-admin/upload.php1,411 ▲114.29 ▲0.11105.37 ▲0.6048.42 ▲1.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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/gst-for-woocommerce/inc/tmd-ajax.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'tmd_gst_invoice' not found in wp-content/plugins/gst-for-woocommerce/classes/class-tmd-gst-data.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Tmd_Gst_Data' not found in wp-content/plugins/gst-for-woocommerce/admin/templates/tmd-gst-report.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
8 plugin tags: gst woocommerce, woo, woocommerce, gst for woocommerce, tmd...

gst-for-woocommerce/tmd-gst-main.php 85% from 13 tests

The principal PHP file in "GST for WooCommerce" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gst-for-woocommerce.php" instead of "tmd-gst-main.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected11,111 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82116047,825
PHP108203582,050
CSS446611,236

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity81.75
▷ Minimum class complexity1.00
▷ Maximum class complexity302.00
Average method complexity7.21
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods52
▷ Static methods11.92%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants2
▷ Global constants2100.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
6 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_222222_256x240.png3.61KB4.11KB0.00%
assets/css/images/ui-icons_454545_256x240.png3.61KB4.11KB0.00%
assets/css/images/ui-icons_cd0a0a_256x240.png3.68KB4.17KB0.00%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
assets/css/images/ui-icons_888888_256x240.png3.68KB4.18KB0.00%