74% wp-qrcode

Code Review | Wp QrCode

WordPress plugin Wp QrCode scored74%from 54 tests.

About plugin

  • Plugin page: wp-qrcode
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2017
  • Latest release: Aug 5, 2023
  • Number of updates: 31
  • Update frequency: every 66.8 days
  • Top authors: ullakalim8 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by Wp QrCode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.85 ▼0.83
Dashboard /wp-admin3.32 ▲0.0146.71 ▼1.08
Posts /wp-admin/edit.php3.37 ▲0.0150.86 ▲2.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.90 ▲1.58
Media Library /wp-admin/upload.php3.24 ▲0.0133.20 ▼6.43

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 441 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
widget_wpqr_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp QrCode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.101.83 ▼0.0646.12 ▲0.83
Dashboard /wp-admin2,192 ▲185.62 ▲0.0292.36 ▼8.3939.91 ▼1.51
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0139.01 ▲1.3736.12 ▲1.19
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.05622.49 ▼77.9453.51 ▼13.08
Media Library /wp-admin/upload.php1,397 ▼64.21 ▲0.04104.25 ▲0.2144.27 ▲1.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_wpqr_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-qrcode/lib/index.php

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: qr code scanner, wp qr code, qr code wordpress plugin, qr code shortcodes, qr code in post...

wp-qrcode/wp-qrcode.php Passed 13 tests

Analyzing the main PHP file in "Wp QrCode" version 1.1.1
108 characters long description:
This is a free contemporary multi-purpose responsive plugin will Generate the Qrcode Based on the Shortcode

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-qrcode/lib/tools/merge.bat
4,518 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,3001,1164,514
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.94
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods272
▷ Static methods12244.85%
▷ Public methods26898.53%
▷ Protected methods00.00%
▷ Private methods41.47%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants71
▷ Global constants71100.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
43 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/cache/frame_18.png0.22KB0.21KB▼ 5.26%
lib/cache/frame_39.png0.26KB0.23KB▼ 9.85%
lib/cache/frame_13.png0.21KB0.19KB▼ 5.24%
lib/cache/frame_29.png0.23KB0.21KB▼ 7.76%
lib/cache/frame_35.png0.24KB0.21KB▼ 9.47%