78% auto-login-after-registration

Code Review | Auto Login After Registration

WordPress plugin Auto Login After Registration scored78%from 54 tests.

About plugin

  • Plugin page: auto-login-after-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Aug 20, 2016
  • Number of updates: 9
  • Update frequency: every 40.9 days
  • Top authors: NetAttingo Technologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /6,181 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.07MB] [CPU: ▼13.69ms] Passed 4 tests

Server-side resources used by Auto Login After Registration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.89 ▼2.07
Dashboard /wp-admin3.40 ▲0.0543.02 ▼14.56
Posts /wp-admin/edit.php3.44 ▲0.0842.28 ▼1.39
Add New Post /wp-admin/post-new.php6.09 ▲0.2071.31 ▼33.99
Media Library /wp-admin/upload.php3.34 ▲0.1130.96 ▼4.12
Auto Login after Register /wp-admin/admin.php?page=auto_login_on_register_setting3.2628.18
About Us /wp-admin/admin.php?page=about-us3.2632.12

Server storage [IO: ▲0.06MB] [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: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Login After Registration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.59 ▼1.142.43 ▼0.0746.33 ▲4.38
Dashboard /wp-admin2,231 ▲434.86 ▼0.13104.86 ▲6.0638.70 ▲1.07
Posts /wp-admin/edit.php2,114 ▲222.04 ▲0.0335.98 ▼6.3335.32 ▲0.29
Add New Post /wp-admin/post-new.php1,549 ▲3023.26 ▼0.02640.52 ▲23.7052.99 ▲4.59
Media Library /wp-admin/upload.php1,416 ▲254.20 ▼0.0195.79 ▼6.2842.43 ▼1.97
Auto Login after Register /wp-admin/admin.php?page=auto_login_on_register_setting8382.0324.5830.79
About Us /wp-admin/admin.php?page=about-us8242.0329.4730.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=auto_login_on_register_setting
    • > Notice in wp-content/plugins/auto-login-after-registration/pages/auto_login_on_register_setting.php+8
    Undefined index: add_opt_submit
    • > GET request to /wp-admin/admin.php?page=auto_login_on_register_setting
    • > Notice in wp-content/plugins/auto-login-after-registration/pages/auto_login_on_register_setting.php+29
    Undefined variable: message

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/auto-login-after-registration/auto-login-after-registration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/auto-login-after-registration/pages/about-us.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/auto-login-after-registration/pages/auto_login_on_register_setting.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Back Auto Login After Registration setting), #2 (Front end registration form), #3 (Front end login form)
The official readme.txt is a good inspiration

auto-login-after-registration/auto-login-after-registration.php Passed 13 tests

The entry point to "Auto Login After Registration" version 1.0.0 is a PHP file that has certain tags in its header comment area
133 characters long description:
This plugin allows users to easily add a simple user registration form and login form anywhere on their site using simple shortcode.

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
Success! There were no dangerous files found in this plugin312 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35325217
CSS244783
JavaScript10112

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.68KB13.31KB▼ 55.14%
screenshot-3.png6.37KB3.59KB▼ 43.66%
screenshot-2.png12.92KB6.41KB▼ 50.40%