10% wp-login-security-2

Code Review | WP Login Security 2

WordPress plugin WP Login Security 2 scored10%from 54 tests.

About plugin

  • Plugin page: wp-login-security-2
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Nov 23, 2012
  • Latest release: Dec 19, 2012
  • Number of updates: 15
  • Update frequency: every 1.8 days
  • Top authors: andersvinther2 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /7,671 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-login-security-2/wp-login-security-2.php+73
    Trying to access array offset on value of type null

Server metrics [RAM: ▼0.16MB] [CPU: ▼22.04ms] Passed 4 tests

An overview of server-side resources used by WP Login Security 2
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.87 ▼5.46
Dashboard /wp-admin3.16 ▼0.1925.01 ▼38.28
Posts /wp-admin/edit.php3.29 ▼0.0732.14 ▼14.88
Add New Post /wp-admin/post-new.php5.48 ▼0.4067.71 ▼28.51
Media Library /wp-admin/upload.php3.22 ▼0.0027.88 ▼6.50
WP Login Security 2 /wp-admin/options-general.php?page=wploginsecurity23.1325.65

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
wploginsecurity2_ip_whitelist
wploginsecurity2
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Login Security 2
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.29 ▼1.301.85 ▼0.1237.88 ▼5.33
Dashboard /wp-admin2,210 ▲184.88 ▼0.02114.27 ▲10.8843.04 ▲4.47
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0337.06 ▲1.1631.15 ▼4.73
Add New Post /wp-admin/post-new.php1,545 ▲3118.34 ▼5.14644.02 ▲6.5759.11 ▲6.11
Media Library /wp-admin/upload.php1,392 ▲74.26 ▲0.0594.36 ▼5.9440.69 ▼4.51
WP Login Security 2 /wp-admin/options-general.php?page=wploginsecurity29612.0225.8729.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wploginsecurity2
    • > Warning in wp-content/plugins/wp-login-security-2/wp-login-security-2.php+103
    session_start(): Cannot start session when headers already sent

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-login-security-2/wpls2-options-page.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-login-security-2/wp-login-security-2.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: lockdown, authentication, two factor, admin, login...

wp-login-security-2/wp-login-security-2.php Passed 13 tests

"WP Login Security 2" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
140 characters long description:
Allows users to setup IP whitelists for logging in and sends them an email with an activation key if the IP address is not on the whitelist.

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
There were no executable files found in this plugin278 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47261278

PHP code Passed 2 tests

An short overview of 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.22
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
logo.png34.15KB14.02KB▼ 58.96%