68% qr-code-login-by-tagauth

Code Review | TagAuth

WordPress plugin TagAuth scored68%from 54 tests.

About plugin

  • Plugin page: qr-code-login-by-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2013
  • Latest release: Mar 15, 2015
  • Number of updates: 8
  • Update frequency: every 64.3 days
  • Top authors: apsense (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /883 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by TagAuth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.306.78 ▼33.23
Dashboard /wp-admin2.18 ▼1.128.12 ▼38.85
Posts /wp-admin/edit.php2.18 ▼1.188.29 ▼44.41
Add New Post /wp-admin/post-new.php2.18 ▼3.716.63 ▼101.15
Media Library /wp-admin/upload.php2.18 ▼1.057.23 ▼26.59
TagAuth /wp-admin/options-general.php?page=qr-code-login-by-tagauth/tagauth.php2.187.19
Get QR Key /wp-admin/index.php?page=get_qr_key2.187.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TagAuth
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.37 ▼0.022.12 ▲0.3836.64 ▼5.18
Dashboard /wp-admin2,205 ▲285.67 ▲0.1681.45 ▼4.6638.68 ▼2.31
Posts /wp-admin/edit.php2,107 ▲72.07 ▲0.0635.65 ▼0.6232.01 ▼1.14
Add New Post /wp-admin/post-new.php1,536 ▲123.43 ▲5.34667.43 ▼12.4461.47 ▼1.10
Media Library /wp-admin/upload.php1,407 ▲104.25 ▲0.0396.18 ▼10.5842.88 ▼3.38
TagAuth /wp-admin/options-general.php?page=qr-code-login-by-tagauth/tagauth.php8751.8137.2333.59
Get QR Key /wp-admin/index.php?page=get_qr_key8232.0823.3426.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my_qrcode_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=get_qr_key
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my_qrcode_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=get_qr_key
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
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 plugins_url() in wp-content/plugins/qr-code-login-by-tagauth/tagauth.php:12

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Plugin Settings)
You can take inspiration from this readme.txt

qr-code-login-by-tagauth/tagauth.php 92% from 13 tests

The main PHP file in "TagAuth" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("qr-code-login-by-tagauth.php" instead of "tagauth.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected791 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript170127408
PHP16413383

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
btn_android.png4.14KB2.65KB▼ 35.96%
btn_iphone.png3.50KB2.43KB▼ 30.50%