84% scan-to-login

Code Review | Scan-to-Login

WordPress plugin Scan-to-Login scored84%from 54 tests.

About plugin

  • Plugin page: scan-to-login
  • Plugin version: 2.1.201
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Mar 20, 2013
  • Latest release: May 27, 2014
  • Number of updates: 76
  • Update frequency: every 6.0 days
  • Top authors: globalkinetic (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /7,959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.03ms] Passed 4 tests

A check of server-side resources used by Scan-to-Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.97 ▲3.50
Dashboard /wp-admin3.39 ▲0.0447.59 ▼12.70
Posts /wp-admin/edit.php3.44 ▲0.0846.12 ▲0.23
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.15 ▼19.13
Media Library /wp-admin/upload.php3.31 ▲0.0836.37 ▲3.71
Scan-to-Login /wp-admin/options-general.php?page=scantologin3.2828.75

Server storage [IO: ▲0.23MB] [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: 14 new files
Database: no new tables, 13 new options
New WordPress options
scantologin_demo_mode
widget_recent-posts
widget_recent-comments
scantologin_merchant_id
scantologin_site_id
can_compress_scripts
widget_theysaidso_widget
scantologin_position
scantologin_js_file
scantologin_parent_container
...

Browser metrics Passed 4 tests

Checking browser requirements for Scan-to-Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.94 ▼0.498.52 ▲6.8643.15 ▲2.27
Dashboard /wp-admin2,210 ▲195.90 ▲0.93113.93 ▲9.6643.35 ▲1.34
Posts /wp-admin/edit.php2,093 ▲71.99 ▲0.0133.47 ▼2.8333.32 ▼2.47
Add New Post /wp-admin/post-new.php1,536 ▲1723.28 ▲0.15676.18 ▼0.6156.23 ▲1.14
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0696.26 ▼14.4143.57 ▼1.39
Scan-to-Login /wp-admin/options-general.php?page=scantologin7692.0223.5227.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 13 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • scantologin_position
    • scantologin_self_registration_allowed
    • scantologin_parent_container
    • scantologin_js_file
    • scantologin_demo_mode
    • widget_theysaidso_widget
    • scantologin_merchant_id
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scan-to-login/bootstrap.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/scan-to-login/scan-to-login.php:512

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

scan-to-login/scan-to-login.php Passed 13 tests

The principal PHP file in "Scan-to-Login" v. 2.1.201 is loaded by WordPress automatically on each request
31 characters long description:
Scan-to-Login Wordpress Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,042 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP37536605
JavaScript15414311
JSON20082
CSS10044

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity8.22
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
772x250_samsung_verdana4.png115.88KB55.91KB▼ 51.75%
available_for.png1.66KB0.46KB▼ 72.21%
scan_to_login_logo.png6.53KB3.46KB▼ 46.97%
icon.png22.05KB8.82KB▼ 60.02%
appstore_icons.png1.98KB0.63KB▼ 68.36%