87% protect-login-page

Code Review | Protect Login Page

WordPress plugin Protect Login Page scored 87% from 54 tests.

About plugin

  • Plugin page: protect-login-page
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 5.8.1
  • First release: Jun 14, 2018
  • Latest release: Dec 11, 2020
  • Number of updates: 6
  • Update frequency: every 151.8 days
  • Top authors: eemitch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 503 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.50ms] Passed 4 tests

Server-side resources used by Protect Login Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1640.58 ▲16.47
Dashboard /wp-admin3.10 ▲0.0548.19 ▲0.78
Posts /wp-admin/edit.php3.16 ▲0.0546.78 ▼1.44
Add New Post /wp-admin/post-new.php5.46 ▲0.0394.20 ▼567.28
Media Library /wp-admin/upload.php3.05 ▲0.0537.53 ▲1.93
Login Page PIN /wp-admin/options-general.php?page=ee-protect-login-page2.9931.87

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Protect Login Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.91 ▼0.048.42 ▲0.0051.16 ▼1.70
Dashboard /wp-admin2,972 ▲426.02 ▲0.07159.98 ▲3.66119.04 ▼6.46
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0071.61 ▲1.3791.96 ▲5.96
Add New Post /wp-admin/post-new.php1,686 ▲318.77 ▲0.05376.22 ▼22.43118.25 ▲5.88
Media Library /wp-admin/upload.php1,815 ▲85.02 ▲0.02161.93 ▲4.94128.74 ▲2.95
Login Page PIN /wp-admin/options-general.php?page=ee-protect-login-page1,0972.3458.44110.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ee-protect-login-page
    • > Notice in wp-content/plugins/protect-login-page/ee-protect-login-page.php+84
    Undefined index: eePLP
    • > GET request to /wp-admin/options-general.php?page=ee-protect-login-page
    • > Notice in wp-content/plugins/protect-login-page/ee-protect-login-page.php+259
    Undefined variable: eeOutput

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/protect-login-page/support/ee-plugin-author.php
    • > /wp-content/plugins/protect-login-page/support/ee-donations.php
    • > /wp-content/plugins/protect-login-page/support/ee-support-functions.php
    • > /wp-content/plugins/protect-login-page/support/ee-plugin-support.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There were no tags found
You can look at the official readme.txt

protect-login-page/ee-protect-login-page.php 77% from 13 tests

Analyzing the main PHP file in "Protect Login Page" version 1.0.3
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("protect-login-page.php" instead of "ee-protect-login-page.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin615 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP629986411
CSS164120181
JavaScript18323

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
support/images/ee-show-support.png11.08KB5.79KB▼ 47.75%