10% dh-rename-login-url

Code Review | DH Rename Login URL and Two Factor Authentication

WordPress plugin DH Rename Login URL and Two Factor Authentication scored10%from 54 tests.

About plugin

  • Plugin page: dh-rename-login-url
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Jun 4, 2020
  • Latest release: Jun 5, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: ohidul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /422 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/dh-rename-login-url/dh-rename-login-url.php+35
    Non-static method DRenameLoginURL\Base\DRLU_Activate::activate() should not be called statically

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.38ms] Passed 4 tests

A check of server-side resources used by DH Rename Login URL and Two Factor Authentication
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.16 ▼2.85
Dashboard /wp-admin3.35 ▲0.0049.95 ▼16.09
Posts /wp-admin/edit.php3.40 ▲0.0445.13 ▼2.20
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.91 ▼16.31
Media Library /wp-admin/upload.php3.27 ▲0.0436.32 ▼2.28

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 82 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
dh_login

Browser metrics Passed 4 tests

A check of browser resources used by DH Rename Login URL and Two Factor Authentication
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5313.37 ▼1.011.96 ▼0.1831.40 ▼14.71
Dashboard /wp-admin2,241 ▲415.87 ▼0.15110.76 ▲2.0746.78 ▲7.32
Posts /wp-admin/edit.php2,117 ▲172.01 ▲0.0136.74 ▼1.2739.40 ▲4.54
Add New Post /wp-admin/post-new.php1,543 ▼223.22 ▲0.24676.04 ▲31.3461.60 ▲5.14
Media Library /wp-admin/upload.php1,417 ▲204.25 ▼0.03101.49 ▼6.2446.20 ▲1.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/login-error.php
    • > /wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/ask-for-otp.php
    • > /wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/tests/bootstrap.php
    • > /wp-content/plugins/dh-rename-login-url/dh-rename-login-url.php
    • > /wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/login.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sonata\\GoogleAuthenticator\\GoogleAuthenticatorInterface' not found in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/src/GoogleAuthenticator.php:19
    • > PHP Notice
      Undefined variable: debug in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/ask-for-otp.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to a member function getUsername() on null in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/loggedin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/tests/GoogleQrUrlTest.php:18
    • > PHP Notice
      Undefined variable: debug in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/ask-for-otp.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Sonata\\GoogleAuthenticator\\GoogleAuthenticatorInterface' not found in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/src/GoogleAuthenticator.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dh-rename-login-url/templates/index.php:6
    • > PHP Notice
      Undefined variable: user in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/loggedin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/tests/FixedBitNotationTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Sonata\\GoogleAuthenticator\\GoogleQrUrl' not found in wp-content/plugins/dh-rename-login-url/vendor/sonata-project/google-authenticator/sample/tmpl/show-qr.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: tfa, rename-login-url, two-factor-authentication, login-url, security

dh-rename-login-url/dh-rename-login-url.php 54% from 13 tests

The principal PHP file in "DH Rename Login URL and Two Factor Authentication" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.0" instead of "5.6")
  • Git Repository: A Git repository was detected inside this plugin
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7" instead of "4.6")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected3,657 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP365216951,922
Markdown122850762
CSS2372375
YAML75411188
JavaScript24318154
JSON300129
make114350
XML16428
Bourne Shell512126
Python16916723

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.95
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes525.00%
Methods125
▷ Static methods1612.80%
▷ Public methods12196.80%
▷ Protected methods10.80%
▷ Private methods32.40%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png32.27KB14.09KB▼ 56.34%