77% qr-code-tag-for-wc-from-goaskle-com

Code Review | QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com)

WordPress plugin QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com) scored77%from 54 tests.

About plugin

  • Plugin page: qr-code-tag-for-w...
  • Plugin version: 1.9.28
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2021
  • Latest release: Oct 8, 2023
  • Number of updates: 125
  • Update frequency: every 5.4 days
  • Top authors: www.15.to (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /6,561 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼4.44ms] Passed 4 tests

An overview of server-side resources used by QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3841.94 ▲3.95
Dashboard /wp-admin3.69 ▲0.3453.84 ▼4.92
Posts /wp-admin/edit.php3.80 ▲0.4448.58 ▼1.60
Add New Post /wp-admin/post-new.php6.27 ▲0.3883.07 ▼15.19
Media Library /wp-admin/upload.php3.61 ▲0.3837.28 ▲5.41
QR Code Tag (from Goaskle.com) /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php3.8738.90

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

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

Browser metrics Passed 4 tests

Checking browser requirements for QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.431.71 ▲0.1942.19 ▼1.02
Dashboard /wp-admin2,212 ▲325.72 ▲0.1391.59 ▲3.4641.00 ▼0.83
Posts /wp-admin/edit.php2,128 ▲492.45 ▲0.4435.23 ▼1.5331.92 ▼2.31
Add New Post /wp-admin/post-new.php1,546 ▲1823.36 ▲0.25667.64 ▼23.1436.40 ▼27.58
Media Library /wp-admin/upload.php1,426 ▲234.37 ▲0.1797.10 ▼2.1544.66 ▼2.75
QR Code Tag (from Goaskle.com) /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php2,0222.5855.4551.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • qrct_from_goaskle_com_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+179
    Undefined index: qrct_from_goaskle_com_sc_new_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+184
    Undefined index: qrct_from_goaskle_com_sc_failed_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+190
    Undefined index: qrct_from_goaskle_com_sc_customer_on_hold_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+196
    Undefined index: qrct_from_goaskle_com_sc_customer_processing_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+202
    Undefined index: qrct_from_goaskle_com_sc_customer_completed_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+208
    Undefined index: qrct_from_goaskle_com_sc_customer_refunded_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+214
    Undefined index: qrct_from_goaskle_com_sc_customer_partially_refunded_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+220
    Undefined index: qrct_from_goaskle_com_sc_cancelled_order_wc_emails_enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php
    • > Notice in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php+226
    Undefined index: qrct_from_goaskle_com_sc_customer_invoice_wc_emails_enable

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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      QRcode : Data do not exist. in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qr_img/qr_img.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp.php:113
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp.php on line 96
    • > PHP Notice
      Undefined variable: qrcode_data_string in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qr_img/qr_img.php on line 58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/qr-code-tag-for-wc-from-goaskle-com/lib/qrct/QrctWp-admin.inc.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Widget options), #2 (Tooltip mode), #3 (Admin interface), #4 (Order invoice example (Email)), #5 (QR code example)
You can look at the official readme.txt

qr-code-tag-for-wc-from-goaskle-com/qr-code-tag-for-wc-from-goaskle-com.php 85% from 13 tests

This is the main PHP file of "QR Code Tag for WC order emails, POS receipt emails, PDF invoices, PDF packing slips, Blog posts, Custom post types and Pages (from goaskle.com)" version 1.9.28, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Plugin Name: Please shorten the plugin name (currently 144 characters long instead of max. 70)

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
Everything looks great! No dangerous files found in this plugin3,599 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP87757972,730
PO File4242276645
HTML5930200
JavaScript202215
CSS1129

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity72.20
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods60100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
47 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/qr_img/image/qrv21.png0.25KB0.23KB▼ 7.84%
lib/qr_img/image/qrv24.png0.26KB0.24KB▼ 6.84%
lib/qr_img/image/qrv26.png0.25KB0.23KB▼ 6.98%
lib/qr_img/image/qrv20.png0.23KB0.22KB▼ 6.69%
lib/qr_img/image/qrv36.png0.28KB0.26KB▼ 6.03%