68% qr-code-generator-4-all

Code Review | QR Code Generator 4 All

WordPress plugin QR Code Generator 4 All scored68%from 54 tests.

About plugin

  • Plugin page: qr-code-generator...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Oct 22, 2012
  • Latest release: Feb 5, 2015
  • Number of updates: 31
  • Update frequency: every 27.0 days
  • Top authors: internetloesungen (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /6,468 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.25ms] Passed 4 tests

A check of server-side resources used by QR Code Generator 4 All
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.60 ▼3.57
Dashboard /wp-admin3.40 ▲0.0647.84 ▼14.82
Posts /wp-admin/edit.php3.45 ▲0.1049.13 ▲1.00
Add New Post /wp-admin/post-new.php5.98 ▲0.1091.47 ▼3.62
Media Library /wp-admin/upload.php3.32 ▲0.1035.95 ▲2.62
QR Generator 4 All /wp-admin/options-general.php?page=qrgen4all-setup-menu3.3032.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 476 new files
Database: 1 new table, 6 new options
New tables
wp_qrgen4all_uploads
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

QR Code Generator 4 All: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.55 ▼1.201.66 ▼0.1839.07 ▼2.66
Dashboard /wp-admin2,210 ▲224.84 ▼0.0599.25 ▼19.7342.31 ▼6.90
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0239.74 ▲4.2336.21 ▼0.78
Add New Post /wp-admin/post-new.php1,517 ▼2717.53 ▼0.57699.91 ▲58.6654.53 ▲4.62
Media Library /wp-admin/upload.php1,389 ▲74.20 ▲0.0196.32 ▼4.9240.03 ▼2.88
QR Generator 4 All /wp-admin/options-general.php?page=qrgen4all-setup-menu1,8823.6279.9449.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_qrgen4all_uploads
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/qr-code-generator-4-all/phpqrcode/index.php
    • > /wp-content/plugins/qr-code-generator-4-all/upload.php
    • > /wp-content/plugins/qr-code-generator-4-all/qr.php
    • > /wp-content/plugins/qr-code-generator-4-all/qrpro.php
  • 1× 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/qr-code-generator-4-all/qrgen4all.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Configuration and shortcode usage.), #2 (QR Code editor.)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

qr-code-generator-4-all/qrgen4all.php 92% from 13 tests

The entry point to "QR Code Generator 4 All" version 2.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("qr-code-generator-4-all.php" instead of "qrgen4all.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
There were no executable files found in this plugin10,412 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,5142,0186,591
PO File44446221,446
JavaScript42283011,386
Pascal1379699450
CSS334101356
HTML1370142
Markdown130041

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity32.36
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods368
▷ Static methods12333.42%
▷ Public methods26973.10%
▷ Protected methods9626.09%
▷ Private methods30.82%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants90
▷ Global constants90100.00%
▷ Class constants00.00%
▷ Public constants00.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
71 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qrinfo.png0.85KB0.30KB▼ 64.06%
phpqrcode/cache/frame_32.png0.26KB0.25KB▼ 4.20%
ui/css/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
phpqrcode/cache/frame_40.png0.26KB0.24KB▼ 7.87%
phpqrcode/cache/frame_10.png0.20KB0.20KB▼ 0.99%