83% qrcode-wprhe

Code Review | QR Code Generator

WordPress plugin QR Code Generator scored83%from 54 tests.

About plugin

  • Plugin page: qrcode-wprhe
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2012
  • Latest release: Apr 18, 2015
  • Number of updates: 47
  • Update frequency: every 22.3 days
  • Top authors: ReneHermi (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active /22,964 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.56ms] Passed 4 tests

A check of server-side resources used by QR Code Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0139.38 ▼1.07
Dashboard /wp-admin3.36 ▲0.0148.58 ▼3.19
Posts /wp-admin/edit.php3.41 ▲0.0149.89 ▼3.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0185.36 ▼21.15
Media Library /wp-admin/upload.php3.28 ▲0.0138.22 ▼2.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for QR Code Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▼0.011.77 ▲0.1146.62 ▲1.81
Dashboard /wp-admin2,200 ▲235.62 ▲0.0284.23 ▼8.9039.52 ▼5.49
Posts /wp-admin/edit.php2,105 ▲22.03 ▲0.0841.69 ▲1.1136.37 ▼2.31
Add New Post /wp-admin/post-new.php1,530 ▲223.18 ▲0.05678.38 ▼18.2948.58 ▼8.37
Media Library /wp-admin/upload.php1,405 ▲54.26 ▲0.0699.08 ▼3.8941.66 ▼7.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qrcode-wprhe/qrcode_wprhe.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Shows a example content site with the generated qr code), #2 (Shows the using of the shortcode within the backend in wp-admin), #3 (The QR Code with activated shadow)
  • Tags: You are using too many tags: 21 tag instead of maximum 10
The official readme.txt is a good inspiration

qrcode-wprhe/qrcode_wprhe.php 92% from 13 tests

The main PHP file in "QR Code Generator" ver. 1.2.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("qrcode-wprhe.php" instead of "qrcode_wprhe.php")

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
Everything looks great! No dangerous files found in this plugin65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1312365

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png22.21KB21.41KB▼ 3.63%
powered-by.png1.17KB0.34KB▼ 70.95%
made_with_love.png1.25KB0.35KB▼ 72.08%