88% login-registration-redirects-manager

Code Review | Login, Logout and Registration Redirects manager

WordPress plugin Login, Logout and Registration Redirects manager scored 88% from 54 tests.

About plugin

  • Plugin page: login-registratio...
  • Plugin version: 1.00
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2.4
  • WordPress version: 5.8.1
  • First release: Oct 20, 2019
  • Latest release: Oct 20, 2019
  • Number of updates: 2
  • Update frequency: every 17.0 days
  • Top authors: kaminsky.m (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 299 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼140.18ms] Passed 4 tests

This is a short check of server-side resources used by Login, Logout and Registration Redirects manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.19 ▲0.4737.58 ▲15.74
Dashboard /wp-admin3.42 ▲0.3752.69 ▲9.14
Posts /wp-admin/edit.php3.47 ▲0.3648.94 ▲3.44
Add New Post /wp-admin/post-new.php5.72 ▲0.2988.99 ▼571.45
Media Library /wp-admin/upload.php3.36 ▲0.3636.62 ▼1.83
Login/Register/Logout redirects /wp-admin/options-general.php?page=login-register-redirects-manager3.3735.92

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 74 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login, Logout and Registration Redirects manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,759 ▲16315.87 ▲0.297.92 ▼0.0449.34 ▲4.60
Dashboard /wp-admin3,029 ▲956.10 ▲0.09141.82 ▲4.96121.66 ▲13.86
Posts /wp-admin/edit.php2,790 ▲542.83 ▲0.1470.68 ▲8.07102.10 ▲9.99
Add New Post /wp-admin/post-new.php1,699 ▲2718.89 ▲0.19364.34 ▲8.71107.45 ▲1.06
Media Library /wp-admin/upload.php1,858 ▲545.06 ▲0.05171.24 ▲26.19124.99 ▲3.55
Login/Register/Logout redirects /wp-admin/options-general.php?page=login-register-redirects-manager1,5032.9867.8093.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/login-registration-redirects-manager/views/admin/settings-section/compatible-with.php
    • > /wp-content/plugins/login-registration-redirects-manager/views/admin/settings-section/go-to-pro.php
    • > /wp-content/plugins/login-registration-redirects-manager/views/admin/settings-section/useful_plugins.php
    • > /wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/views/admin-footer.php
    • > /wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/class-admin-dismissible-notice.php
    • > /wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/class-admin-notice-helper.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lrr_is_pro() in wp-content/plugins/login-registration-redirects-manager/views/admin/settings-section/support.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/views/public-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/views/admin-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/login-registration-redirects-manager/vendor/underdev/settings/views/settings-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/login-registration-redirects-manager/vendor/max-kk/wp-notice-lib/views/admin-dismissible-notice.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: login, register, redirect, registration, redirects

login-registration-redirects-manager/login-registration-logout-redirects-manager.php 92% from 13 tests

This is the main PHP file of "Login, Logout and Registration Redirects manager" version 1.00, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("login-registration-redirects-manager.php" instead of "login-registration-logout-redirects-manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,657 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65148962,606
PHP489401,3112,057
Sass5380839
JSON30063
CSS210248
Markdown119044

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.21
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods156
▷ Static methods2616.67%
▷ Public methods15096.15%
▷ Protected methods42.56%
▷ Private methods21.28%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin