10% login-with-qr

Code Review | Login with QR

WordPress plugin Login with QR scored10%from 54 tests.

About plugin

  • Plugin page: login-with-qr
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2017
  • Latest release: Apr 30, 2017
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: dessainsaraiva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,083 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/login-with-qr/qr-user-login.php+35
    Methods with the same name as their class will not be constructors in a future version of PHP; Login_with_QR has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼52.80ms] Passed 4 tests

This is a short check of server-side resources used by Login with QR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.314.33 ▼35.13
Dashboard /wp-admin2.18 ▼1.138.94 ▼38.71
Posts /wp-admin/edit.php2.18 ▼1.187.23 ▼45.48
Add New Post /wp-admin/post-new.php2.18 ▼3.715.29 ▼91.89
Media Library /wp-admin/upload.php2.18 ▼1.065.62 ▼28.78

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Login with QR
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.28 ▼1.091.69 ▲0.0338.97 ▼0.44
Dashboard /wp-admin2,209 ▲215.90 ▲1.01100.81 ▼7.0641.25 ▼1.88
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0341.16 ▼1.3134.37 ▼2.30
Add New Post /wp-admin/post-new.php1,519 ▲223.03 ▲5.46667.30 ▲33.0356.72 ▲1.79
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0195.77 ▼1.6040.56 ▼1.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/login-with-qr/qr-user-login.php+35
    Methods with the same name as their class will not be constructors in a future version of PHP; Login_with_QR has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 fix 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/login-with-qr/qr-user-login.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

login-with-qr/qr-user-login.php 92% from 13 tests

This is the main PHP file of "Login with QR" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("login-with-qr.php" instead of "qr-user-login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin385 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP193123347
JavaScript214238

PHP code Passed 2 tests

This is a short overview 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.49
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin