10% vasaio-qr-code

Code Review | Vasaio QR Code

WordPress plugin Vasaio QR Code scored 10% from 54 tests.

About plugin

  • Plugin page: vasaio-qr-code
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.5
  • WordPress version: 6.3.1
  • First release: Nov 11, 2012
  • Latest release: May 10, 2013
  • Number of updates: 78
  • Update frequency: every 2.3 days
  • Top authors: olarmarius (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 5,748 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/vasaio-qr-code/vasaio-qr-code.php+15
    Use of undefined constant VQRC_TEXTDOMAIN - assumed 'VQRC_TEXTDOMAIN' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.82ms] Passed 4 tests

Analyzing server-side resources used by Vasaio QR Code
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.61 ▼36.20
Dashboard /wp-admin2.06 ▼1.247.37 ▼41.15
Posts /wp-admin/edit.php2.06 ▼1.294.84 ▼41.03
Add New Post /wp-admin/post-new.php2.06 ▼3.825.71 ▼92.90
Media Library /wp-admin/upload.php2.06 ▼1.166.49 ▼25.53
Vasaio QR Code /wp-admin/options-general.php?page=vasaio-qr-code/vasaio-qr-code.php2.075.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 18 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
vasaio_qr_bg_color
widget_vasaioqrcodewidget
widget_recent-posts
vasaio_qr_logo
widget_theysaidso_widget
vasaio_qr_border
widget_recent-comments
...

Browser metrics Passed 4 tests

Vasaio QR Code: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.34 ▼0.981.76 ▼0.2543.27 ▼3.03
Dashboard /wp-admin2,221 ▲305.88 ▲1.02110.30 ▲6.4341.13 ▼3.39
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0635.03 ▲0.1732.61 ▼1.28
Add New Post /wp-admin/post-new.php1,528 ▲823.37 ▲0.26641.10 ▼28.4256.07 ▲4.88
Media Library /wp-admin/upload.php1,403 ▲154.41 ▲0.2092.91 ▼6.0841.97 ▼0.72
Vasaio QR Code /wp-admin/options-general.php?page=vasaio-qr-code/vasaio-qr-code.php1,3831.7527.9133.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/vasaio-qr-code/vasaio-qr-code.php+15
    Use of undefined constant VQRC_TEXTDOMAIN - assumed 'VQRC_TEXTDOMAIN' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_vasaioqrcodewidget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=vasaio-qr-code/vasaio-qr-code.php
    • > Warning in wp-content/plugins/vasaio-qr-code/vasaio-qr-code.php+15
    Use of undefined constant VQRC_TEXTDOMAIN - assumed 'VQRC_TEXTDOMAIN' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vasaio-qr-code/vasaio-qr-code.php
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
    • > GET request to /wp-admin/options-general.php?page=vasaio-qr-code/vasaio-qr-code.php
    • > Notice in wp-content/plugins/vasaio-qr-code/vasaio-qr-code.php+475
    Undefined index: submit

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vasaio-qr-code/vasaio-qr-code-encoder/vasaio-qr-code-encoder.php
  • 4095× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 194
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 194
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 194
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 195
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/vasaio-qr-code/images/vasaio-qr-code-banner.php on line 194

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

vasaio-qr-code/vasaio-qr-code.php Passed 13 tests

The main PHP file in "Vasaio QR Code" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Generate standalone QR codes, colored and customized with logo inside.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .url - Internet Shortcut in Firefox, IE, Chrome, Safari
      • wp-content/plugins/vasaio-qr-code/tabber/JavaScript tabifier.url
4,268 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP69218223,290
JavaScript212935716
PO File16999150
CSS1162570
HTML218142

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity24.83
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods148
▷ Static methods6141.22%
▷ Public methods14698.65%
▷ Protected methods00.00%
▷ Private methods21.35%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/VASAIO-QR-Code-logo.png7.94KB4.33KB▼ 45.44%
vasaio-qr-code-encoder/jscolor/hv.png2.80KB7.32KB0.00%
images/icon.png1.74KB1.28KB▼ 26.08%
vasaio-qr-code-encoder/jscolor/hs.png2.62KB7.54KB0.00%