84% custom-login-form-and-logout-redirect

Code Review | Custom Login Form and Logout Redirect

WordPress plugin Custom Login Form and Logout Redirect scored84%from 54 tests.

About plugin

  • Plugin page: custom-login-form...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 24, 2021
  • Latest release: Mar 24, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: tony199x (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /792 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.08MB] [CPU: ▼5.62ms] Passed 4 tests

A check of server-side resources used by Custom Login Form and Logout Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.91 ▼11.42
Dashboard /wp-admin3.38 ▲0.0845.09 ▼3.66
Posts /wp-admin/edit.php3.43 ▲0.0854.30 ▲9.59
Add New Post /wp-admin/post-new.php5.96 ▲0.0880.93 ▼5.94
Media Library /wp-admin/upload.php3.30 ▲0.0834.90 ▼1.46
Login Form - Logout /wp-admin/options-general.php?page=login-form-logout-redirect-settings3.3331.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
mstteam_login_logout_settings
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Custom Login Form and Logout Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.61 ▼0.839.22 ▲7.4239.69 ▼4.77
Dashboard /wp-admin2,213 ▲254.85 ▼0.9698.52 ▼4.8539.88 ▲0.30
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0133.21 ▼0.2936.25 ▼1.78
Add New Post /wp-admin/post-new.php1,540 ▲1922.83 ▼0.70608.39 ▼3.5551.18 ▼11.99
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.0893.22 ▼5.5941.25 ▼2.86
Login Form - Logout /wp-admin/options-general.php?page=login-form-logout-redirect-settings1,1801.9129.9131.24

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • mstteam_login_logout_settings
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/custom-login-form-and-logout-redirect/includes/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/custom-login-form-and-logout-redirect/includes/views/tab-logout.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/custom-login-form-and-logout-redirect/includes/views/tab-login.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-login-form-and-logout-redirect/mst-login-form-and-logout-redirect.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-login-form-and-logout-redirect/mst-login-form-and-logout-redirect.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/custom-login-form-and-logout-redirect/mst-login-form-and-logout-redirect.php on line 14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: login from for custom post type, custom logout redirect url, custom login form, wordpress logout to custom url, login from for post...

custom-login-form-and-logout-redirect/mst-login-form-and-logout-redirect.php 85% from 13 tests

The principal PHP file in "Custom Login Form and Logout Redirect" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-login-form-and-logout-redirect.php" instead of "mst-login-form-and-logout-redirect.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected807 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP72210521
CSS281190
JavaScript28396

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity25.00
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin