84% redirect-user-after-login-to-homepage

Code Review | Redirect User to Homepage after log in

WordPress plugin Redirect User to Homepage after log in scored84%from 54 tests.

About plugin

  • Plugin page: redirect-user-aft...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 4
  • Update frequency: every 83.0 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.25ms] Passed 4 tests

This is a short check of server-side resources used by Redirect User to Homepage after log in
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.68 ▼2.98
Dashboard /wp-admin3.31 ▲0.0150.23 ▼0.00
Posts /wp-admin/edit.php3.36 ▲0.0051.66 ▲8.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.29 ▼2.68
Media Library /wp-admin/upload.php3.23 ▲0.0037.14 ▲0.65

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redirect User to Homepage after log in
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.111.94 ▲0.2641.32 ▲2.23
Dashboard /wp-admin2,195 ▲215.51 ▼0.0187.44 ▼7.0340.77 ▲0.53
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0140.05 ▲3.7737.13 ▲0.75
Add New Post /wp-admin/post-new.php1,526 ▼923.53 ▲5.49672.71 ▲18.4064.04 ▼1.80
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.0194.73 ▼8.8446.39 ▲1.85

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 detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/redirect-user-after-login-to-homepage/RedirectUserAfterLogin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: log in redirect

redirect-user-after-login-to-homepage/RedirectUserAfterLogin.php 92% from 13 tests

The main PHP script in "Redirect User to Homepage after log in" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("redirect-user-after-login-to-homepage.php" instead of "RedirectUserAfterLogin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin