10% lh-login-page

Code Review | LH Login Page

WordPress plugin LH Login Page scored10%from 54 tests.

About plugin

  • Plugin page: lh-login-page
  • Plugin version: 2.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: May 28, 2019
  • Number of updates: 47
  • Update frequency: every 54.8 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,579 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/lh-login-page/lh-login-page.php+712
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.55MB] [CPU: ▼17.83ms] Passed 4 tests

Server-side resources used by LH Login Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.68 ▲3.72
Dashboard /wp-admin3.43 ▲0.1349.51 ▼8.09
Posts /wp-admin/edit.php3.54 ▲0.1952.00 ▼4.07
Add New Post /wp-admin/post-new.php3.31 ▼2.5847.23 ▼61.63
Media Library /wp-admin/upload.php3.35 ▲0.1339.66 ▲2.46
Login Page /wp-admin/options-general.php?page=lh-login-page/lh-login-page.php3.3334.11

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/lh-login-page/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
lh_login_page-options

Browser metrics Passed 4 tests

A check of browser resources used by LH Login Page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.47 ▼0.071.63 ▼0.3141.38 ▲0.37
Dashboard /wp-admin2,228 ▲224.83 ▼1.07112.15 ▲9.7941.98 ▼4.55
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0340.06 ▼2.3237.08 ▼3.85
Add New Post /wp-admin/post-new.php1,549 ▲1723.15 ▼0.35648.08 ▼29.7947.29 ▼15.74
Media Library /wp-admin/upload.php1,401 ▲14.29 ▲0.0598.68 ▼6.5646.24 ▲0.07
Login Page /wp-admin/options-general.php?page=lh-login-page/lh-login-page.php8772.0225.1726.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • lh_login_page-options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-login-page/lh-login-page.php
    • > Notice in wp-content/plugins/lh-login-page/partials/option-settings.php+13
    Undefined index: lh_login_page-use_email
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-login-page/lh-login-page.php
    • > Notice in wp-content/plugins/lh-login-page/partials/option-settings.php+20
    Undefined index: lh_login_page-allow_redirects
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-login-page/lh-login-page.php
    • > Notice in wp-content/plugins/lh-login-page/partials/option-settings.php+27
    Undefined index: lh_login_page-appmode_prompt_logon

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× 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/lh-login-page/partials/option-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/lh-login-page/partials/lh_login_page_shortcode_output.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: widget, modal, login, popup, frontend...

lh-login-page/lh-login-page.php 92% from 13 tests

The main file in "LH Login Page" v. 2.14 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin650 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP356157545
JavaScript410915105

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity51.50
▷ Minimum class complexity13.00
▷ Maximum class complexity90.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3078.95%
▷ Protected methods00.00%
▷ Private methods821.05%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin