10% wp-login-box

Code Review | WP Login Box

WordPress plugin WP Login Box scored 10% from 54 tests.

About plugin

  • Plugin page: wp-login-box
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 5.9.2
  • First release: Sep 22, 2012
  • Latest release: Jul 3, 2013
  • Number of updates: 98
  • Update frequency: every 2.9 days
  • Top authors: Ziv (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active / 34,225 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
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-login-box/plugin.php+13
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼2.46MB] [CPU: ▼376.31ms] Passed 4 tests

This is a short check of server-side resources used by WP Login Box
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.91 ▼1.614.69 ▼48.77
Dashboard /wp-admin1.93 ▼1.485.04 ▼31.48
Posts /wp-admin/edit.php1.93 ▼1.715.10 ▼93.05
Add New Post /wp-admin/post-new.php1.93 ▼5.044.22 ▼1,331.95
Media Library /wp-admin/upload.php1.93 ▼1.374.35 ▼26.75
WPLB Options /wp-admin/options-general.php?page=options-general.php_wplb_options1.935.28

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP Login Box: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲4915.18 ▼0.607.26 ▲1.372.86 ▲0.05
Dashboard /wp-admin2,897 ▲366.15 ▼0.03115.75 ▼29.73158.83 ▼11.62
Posts /wp-admin/edit.php2,696 ▲113.24 ▲0.0061.18 ▼32.64136.66 ▼49.23
Add New Post /wp-admin/post-new.php1,701 ▼5122.33 ▲1.34448.09 ▼8.75159.37 ▼26.02
Media Library /wp-admin/upload.php1,700 ▼15.54 ▲0.01147.44 ▲6.16183.93 ▼75.72
WPLB Options /wp-admin/options-general.php?page=options-general.php_wplb_options1,3853.1769.60201.04

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-login-box/plugin.php+13
    Trying to access array offset on value of type bool

Smoke tests 25% 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
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=options-general.php_wplb_options
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wp-login-box/plugin.php+210
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=options-general.php_wplb_options
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5768
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wplbstyle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-login-box/out.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-login-box/widget/in.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-login-box/widget/out.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-login-box/plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-login-box/in.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=options-general.php_wplb_options
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at $.\u003Ccomputed>.disableTextSelection (/wp-content/plugins/wp-login-box/admin-page-class/js/iphone-style-checkboxes/iphone-style-checkboxes.js:53:20)\n at new $.\u003Ccomputed> (/wp-content/plugins/wp-login-box/admin-page-class/js/iphone-style-checkboxes/iphone-style-checkboxes.js:20:8)\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/wp-login-box/admin-page-class/js/iphone-style-checkboxes/iphone-style-checkboxes.js:168:31)\n at Function.each (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:3003)\n at s.fn.init.each (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:1481)\n at s.fn.init.$.fn.\u003Ccomputed> [as iphoneStyle] (/wp-content/plugins/wp-login-box/admin-page-class/js/iphone-style-checkboxes/iphone-style-checkboxes.js:167:14)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-login-box/admin-page-class/js/Admin_Page_Class.js:214:22)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30038)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=options-general.php_wplb_options
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The Log-In form with the Blue style.), #2 (The Log-In form with the Dark style.), #3 (The Log-Out form with the Dark style.), #4 (The options panel.)
Please take inspiration from this readme.txt

wp-login-box/plugin.php 92% from 13 tests

The main file in "WP Login Box" v. 2.0.2 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-login-box.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin7,881 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript94795845,038
PHP63711,2122,118
CSS96326725

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity154.50
▷ Minimum class complexity5.00
▷ Maximum class complexity304.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods113
▷ Static methods00.00%
▷ Public methods11097.35%
▷ Protected methods00.00%
▷ Private methods32.65%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin-page-class/js/iphone-style-checkboxes/images/on.png2.44KB2.48KB0.00%
admin-page-class/images/add.png1.84KB1.49KB▼ 19.11%
screenshot-4.png48.59KB17.58KB▼ 63.82%
screenshot-1.png4.75KB2.47KB▼ 48.05%
admin-page-class/images/remove.png2.15KB1.67KB▼ 22.25%