10% wp-qr-code-generator

Code Review | WP QR Code Generator

WordPress plugin WP QR Code Generator scored 10% from 54 tests.

About plugin

  • Plugin page: wp-qr-code-generator
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 5.8.1
  • First release: Apr 8, 2014
  • Latest release: Jun 18, 2019
  • Number of updates: 32
  • Update frequency: every 59.3 days
  • Top authors: vivacityinfotech.jaipur (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active / 12,064 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-qr-code-generator/wp-qr-code-generator.php+177
    Function create_function() is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼186.71ms] Passed 4 tests

An overview of server-side resources used by WP QR Code Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.86 ▼0.864.87 ▼16.94
Dashboard /wp-admin1.88 ▼1.186.05 ▼34.14
Posts /wp-admin/edit.php1.88 ▼1.235.52 ▼41.12
Add New Post /wp-admin/post-new.php1.88 ▼3.565.57 ▼638.94
Media Library /wp-admin/upload.php1.88 ▼1.135.89 ▼32.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_qrcode_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP QR Code Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲25416.57 ▲1.0013.19 ▲4.2949.06 ▲0.79
Dashboard /wp-admin3,002 ▲716.61 ▲0.63144.40 ▲5.84113.16 ▲1.66
Posts /wp-admin/edit.php2,774 ▲352.79 ▲0.0772.97 ▲10.19112.98 ▲21.87
Add New Post /wp-admin/post-new.php1,531 ▲2718.72 ▲0.23383.76 ▲14.70130.75 ▲23.45
Media Library /wp-admin/upload.php1,836 ▲325.18 ▲0.15129.15 ▼33.60119.21 ▲2.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-qr-code-generator/wp-qr-code-generator.php+177
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_qrcode_widget

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (WP QR Code Generator plugin appears after activation in Widget section.), #2 (WP QR Code Generator plugin appears after activation in Pages or post section.)
The official readme.txt might help

wp-qr-code-generator/wp-qr-code-generator.php 92% from 13 tests

The primary PHP file in "WP QR Code Generator" version 1.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin278 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13025185
JavaScript3121693

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity15.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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png11.44KB4.93KB▼ 56.90%
screenshot-1.png33.47KB13.35KB▼ 60.12%