84% hide-login-page

Code Review | Hide login page, Hide wp admin - stop attack on login page

WordPress plugin Hide login page, Hide wp admin - stop attack on login page scored84%from 54 tests.

About plugin

  • Plugin page: hide-login-page
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Mar 23, 2023
  • Number of updates: 18
  • Update frequency: every 101.2 days
  • Top authors: webcraftic (55.56%)alexkovalevv (44.44%)creativemotion (11.11%)Otto42 (11.11%)

Code review

54 tests

User reviews

9 reviews

Install metrics

30,000+ active /210,488 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 gracefully, with no errors

Server metrics [RAM: ▲1.47MB] [CPU: ▲5.33ms] Passed 4 tests

Server-side resources used by Hide login page, Hide wp admin - stop attack on login page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8249.73 ▲6.38
Dashboard /wp-admin5.04 ▲1.7464.04 ▲13.96
Posts /wp-admin/edit.php5.09 ▲1.7357.59 ▲8.14
Add New Post /wp-admin/post-new.php7.57 ▲1.68107.81 ▼7.18
Media Library /wp-admin/upload.php4.89 ▲1.6653.46 ▲18.45
Hide Login Page /wp-admin/options-general.php?page=hlp_hide_login-wbcr_hide_login_page5.85306.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 222 new files
Database: no new tables, 8 new options
New WordPress options
wbcr_hlp_plugin_activated
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
wbcr_hlp_plugin_version
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide login page, Hide wp admin - stop attack on login page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲10313.36 ▼1.071.81 ▼0.0942.49 ▼3.70
Dashboard /wp-admin2,266 ▲754.89 ▼0.23106.41 ▲6.9743.68 ▼7.67
Posts /wp-admin/edit.php2,149 ▲602.06 ▲0.0740.70 ▲0.0835.75 ▼1.53
Add New Post /wp-admin/post-new.php1,558 ▲4418.24 ▲0.75616.51 ▲6.4460.45 ▲7.50
Media Library /wp-admin/upload.php1,425 ▲404.29 ▲0.1197.67 ▲2.3941.54 ▼2.60
Hide Login Page /wp-admin/options-general.php?page=hlp_hide_login-wbcr_hide_login_page1,2272.4443.0137.95

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_115\\Pages\\Step' not found in wp-content/plugins/hide-login-page/libs/factory/templates/pages/setup-parts/class-step-form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_FactoryForms462_FontControl' not found in wp-content/plugins/hide-login-page/libs/factory/forms/controls/google-font.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_115\\Pages\\Step' not found in wp-content/plugins/hide-login-page/libs/factory/templates/pages/setup-parts/class-step-custom.php:11

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 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

hide-login-page/hide-login-page.php Passed 13 tests

Analyzing the main PHP file in "Hide login page, Hide wp admin - stop attack on login page" version 1.1.7
95 characters long description:
Hide wp-login.php login page and close wp-admin access to avoid hacker attacks and brute force.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected18,135 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1093,0747,14510,530
CSS251662512,570
LESS6409911,973
JSON1001,810
PO File7173241638
JavaScript15185199612
Markdown1102

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.47
Average class complexity16.35
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces9
Interfaces2
Traits1
Classes93
▷ Abstract classes1617.20%
▷ Concrete classes7782.80%
▷ Final classes00.00%
Methods689
▷ Static methods273.92%
▷ Public methods52175.62%
▷ Protected methods14220.61%
▷ Private methods263.77%
Functions32
▷ Named functions1959.38%
▷ Anonymous functions1340.62%
Constants41
▷ Global constants3482.93%
▷ Class constants717.07%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/factory/templates/pages/templates/impressive/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%
libs/factory/templates/pages/templates/impressive/assets/img/paypal-donate.png12.44KB4.99KB▼ 59.88%
libs/factory/templates/pages/templates/impressive-lite/assets/img/webcraftic-plugin-icon.png1.97KB0.75KB▼ 61.79%
libs/factory/templates/pages/templates/impressive-lite/assets/img/paypal-donate.png12.44KB4.99KB▼ 59.88%
libs/factory/templates/pages/templates/impressive-lite/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%