57% qr-code-management

Code Review | QR Code Management

WordPress plugin QR Code Management scored57%from 54 tests.

About plugin

  • Plugin page: qr-code-management
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Oct 31, 2019
  • Latest release: Apr 16, 2021
  • Number of updates: 21
  • Update frequency: every 25.4 days
  • Top authors: RedWoodCIty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,585 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.32MB] [CPU: ▼57.94ms] Passed 4 tests

A check of server-side resources used by QR Code Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.7317.68 ▼38.64
Dashboard /wp-admin2.82 ▼0.4818.74 ▼39.98
Posts /wp-admin/edit.php2.82 ▼1.0219.19 ▼33.78
Add New Post /wp-admin/post-new.php2.82 ▼3.0717.08 ▼119.36
Media Library /wp-admin/upload.php2.82 ▼0.4116.21 ▼20.77
Add New /wp-admin/post-new.php?post_type=rwcqrcm2.8219.21
QR code list /wp-admin/edit.php?post_type=rwcqrcm2.8312.69
Setting /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting2.8316.09

Server storage [IO: ▲22.27MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 504 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
rwc_qrcm_db_version
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for QR Code Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,019 ▲25815.06 ▲0.621.91 ▼0.0540.47 ▼4.69
Dashboard /wp-admin2,416 ▲2136.69 ▲1.76143.73 ▲25.4842.46 ▼1.71
Posts /wp-admin/edit.php2,324 ▲2243.72 ▲1.6959.63 ▲21.2837.18 ▲0.28
Add New Post /wp-admin/post-new.php1,579 ▲3123.60 ▲0.76680.56 ▲73.6336.44 ▼12.38
Media Library /wp-admin/upload.php1,464 ▲644.54 ▲0.3094.61 ▼6.7444.75 ▼1.97
Add New /wp-admin/post-new.php?post_type=rwcqrcm1,6113.7668.2031.65
QR code list /wp-admin/edit.php?post_type=rwcqrcm1,2863.8156.0428.35
Setting /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting2,1173.8478.9678.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/qr-code-management/includes/Qrcode.php+45
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • rwc_qrcm_db_version
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/includes/Qrcode.php+778
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/includes/Qrcode.php+45
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+143
    Undefined variable: rwcqrcm_qrsettings_logo
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+266
    Undefined variable: rwcqrcm_qrsettings_background_image
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+46
    Undefined variable: rwcqrcm_qrsettings_individual
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+58
    Undefined variable: rwcqrcm_qrsettings_margin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+83
    Undefined variable: rwcqrcm_qrsettings_correction_level
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+96
    Undefined variable: rwcqrcm_qrsettings_label
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+108
    Undefined variable: rwcqrcm_qrsettings_size_width
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+118
    Undefined variable: rwcqrcm_qrsettings_color
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+128
    Undefined variable: rwcqrcm_qrsettings_background_color
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+180
    Undefined variable: rwcqrcm_qrsettings_logo_width
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+182
    Undefined variable: rwcqrcm_qrsettings_logo_height
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+207
    Undefined variable: rwcqrcm_qrsettings_background_image_has_value
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+242
    Undefined variable: rwcqrcm_qrsettings_background_image_edit
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+313
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_rad
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+276
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_topText
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+260
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_topTextType
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+283
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_bottomText
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+297
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_fontSize
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+290
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_fontFamiry
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+305
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_fontColor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Notice in wp-content/plugins/qr-code-management/templates/meta-box-qrcode-settings.php+332
    Undefined variable: rwcqrcm_qrsettings_background_image_edit_qrcodeSize

SRP 0% 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/qr-code-management/vendor/symfony/mime/Resources/bin/update_mime_types.php
  • 254× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Mime\\Encoder\\ContentEncoderInterface' not found in wp-content/plugins/qr-code-management/vendor/symfony/mime/Encoder/EightBitContentEncoder.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Mime\\Exception\\ExceptionInterface' not found in wp-content/plugins/qr-code-management/vendor/symfony/mime/Exception/InvalidArgumentException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpFoundation\\Response' not found in wp-content/plugins/qr-code-management/vendor/endroid/qr-code/src/Response/QrCodeResponse.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Mime\\Part\\DataPart' not found in wp-content/plugins/qr-code-management/vendor/symfony/mime/Part/MessagePart.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Endroid\\QrCode\\Writer\\AbstractWriter' not found in wp-content/plugins/qr-code-management/vendor/endroid/qr-code/src/Writer/SvgWriter.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'DASPRiD\\Enum\\Exception\\ExceptionInterface' not found in wp-content/plugins/qr-code-management/vendor/dasprid/enum/src/Exception/SerializeNotSupportedException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/qr-code-management/vendor/dasprid/enum/test/NullValueTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Mime\\Encoder\\ContentEncoderInterface' not found in wp-content/plugins/qr-code-management/vendor/symfony/mime/Encoder/QpContentEncoder.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Zxing\\ResultPoint' not found in wp-content/plugins/qr-code-management/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPattern.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\RoundBlockSizeMode\\RoundBlockSizeModeInterface' not found in wp-content/plugins/qr-code-management/vendor/endroid/qr-code/src/RoundBlockSizeMode/RoundBlockSizeModeShrink.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/qr-code-management/assets/js/uploader.js?ver=1618563364:41:28)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'getContext')" "TypeError: Cannot read properties of null (reading 'getContext')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/qr-code-management/assets/js/use_qrcodeeditor.js?ver=1618563364:5:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'getContext')
    • > GET request to /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=rwcqrcm&page=rwcqrcm-setting 535:29 Uncaught SyntaxError: Unexpected token ','

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: qrcode, eps, jpeg, qr code, jpg...

qr-code-management/qr-code-management.php 92% from 13 tests

The primary PHP file in "QR Code Management" version 1.5.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin38,788 lines of code in 473 files:
LanguageFilesBlank linesComment linesLines of code
PHP4197,53213,67335,690
JSON15001,311
Markdown202370814
JavaScript740153269
PO File1278530262
Sass1420173
CSS1217111
XML56385
YAML410073

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.70
▷ Minimum class complexity1.00
▷ Maximum class complexity232.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces80
Interfaces51
Traits0
Classes355
▷ Abstract classes164.51%
▷ Concrete classes33995.49%
▷ Final classes19056.05%
Methods2,488
▷ Static methods31412.62%
▷ Public methods2,13685.85%
▷ Protected methods1084.34%
▷ Private methods2449.81%
Functions101
▷ Named functions7069.31%
▷ Anonymous functions3130.69%
Constants313
▷ Global constants4213.42%
▷ Class constants27186.58%
▷ Public constants16460.52%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/endroid/qr-code/tests/assets/symfony.png15.90KB16.60KB0.00%
vendor/khanamiryan/qrcode-detector-decoder/tests/qrcodes/hello_world.png3.05KB0.24KB▼ 92.25%
assets/images/sample_bg.png40.07KB17.40KB▼ 56.58%
vendor/endroid/qr-code/assets/images/symfony.png15.90KB16.60KB0.00%
assets/images/sample_qrcode.png3.49KB0.40KB▼ 88.52%