10% wpqr-qr-code

Code Review | WPQR QR-Code Generator

WordPress plugin WPQR QR-Code Generator scored10%from 54 tests.

About plugin

  • Plugin page: wpqr-qr-code
  • Plugin version: 0.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2012
  • Latest release: Nov 6, 2012
  • Number of updates: 37
  • Update frequency: every 3.9 days
  • Top authors: QRtool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /11,691 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wpqr-qr-code/wpqr_qr-code-generator.php+232
    Methods with the same name as their class will not be constructors in a future version of PHP; wpqr_qr_code_Widget has a deprecated constructor

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

A check of server-side resources used by WPQR QR-Code Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.234.81 ▼30.53
Dashboard /wp-admin2.26 ▼1.095.71 ▼53.03
Posts /wp-admin/edit.php2.26 ▼1.106.55 ▼46.56
Add New Post /wp-admin/post-new.php2.26 ▼3.646.57 ▼95.47
Media Library /wp-admin/upload.php2.26 ▼0.986.04 ▼26.43
QR-Code /wp-admin/options-general.php?page=wpqr_qr-generator-settings2.265.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_wpqr_qr_code-widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WPQR QR-Code Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.23 ▼0.121.78 ▲0.1838.96 ▲0.77
Dashboard /wp-admin2,196 ▲195.64 ▲0.0282.11 ▼2.8741.02 ▼1.58
Posts /wp-admin/edit.php2,107 ▲42.03 ▲0.0041.28 ▲3.4436.64 ▲1.98
Add New Post /wp-admin/post-new.php1,530 ▼423.15 ▲5.04651.74 ▲34.2644.82 ▼25.90
Media Library /wp-admin/upload.php1,407 ▲44.14 ▼0.03103.42 ▲5.4243.97 ▼0.60
QR-Code /wp-admin/options-general.php?page=wpqr_qr-generator-settings8121.9927.0731.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wpqr-qr-code/wpqr_qr-code-generator.php+232
    Methods with the same name as their class will not be constructors in a future version of PHP; wpqr_qr_code_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_wpqr_qr_code-widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpqr_qr-generator-settings
    • > Deprecated in wp-content/plugins/wpqr-qr-code/wpqr_qr-code-generator.php+232
    Methods with the same name as their class will not be constructors in a future version of PHP; wpqr_qr_code_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wpqr_qr-generator-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wpqr_qr_code_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpqr_qr-generator-settings
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpqr-qr-code/wpqr_qr-code-generator.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Widget configuration), #2 (Sample usage of shortcode with align=left), #3 (Sample output)
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Plugin Name: You should set the name of your plugin on the first line ( === wpqr-qr-code === )
The official readme.txt is a good inspiration

wpqr-qr-code/wpqr_qr-code-generator.php 85% from 13 tests

Analyzing the main PHP file in "WPQR QR-Code Generator" version 0.2.6
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpqr-qr-code.php" instead of "wpqr_qr-code-generator.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected569 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP17563431
PO File26064138

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity17.75
▷ Minimum method complexity1.00
▷ Maximum method complexity43.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%
Functions5
▷ Named functions5100.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
3 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png36.34KB21.10KB▼ 41.93%
screenshot-2.png26.03KB15.02KB▼ 42.31%
screenshot-1.png22.14KB13.28KB▼ 40.04%