10% login-screen-manager

Code Review | Login Screen Manager

WordPress plugin Login Screen Manager scored10%from 54 tests.

About plugin

  • Plugin page: login-screen-manager
  • Plugin version: 3.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2012
  • Latest release: Jun 30, 2019
  • Number of updates: 123
  • Update frequency: every 21.0 days
  • Top authors: nazmul.hossain.nihal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /31,965 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/login-screen-manager/inc/display.php+223
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.95MB] [CPU: ▼57.45ms] Passed 4 tests

This is a short check of server-side resources used by Login Screen Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.425.75 ▼39.48
Dashboard /wp-admin2.07 ▼1.288.36 ▼54.38
Posts /wp-admin/edit.php2.07 ▼1.297.17 ▼44.48
Add New Post /wp-admin/post-new.php2.07 ▼3.827.36 ▼91.47
Media Library /wp-admin/upload.php2.07 ▼1.167.31 ▼31.20
Login Screen /wp-admin/options-general.php?page=cwlsm-options2.076.82

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Login Screen Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.24 ▼0.191.87 ▼0.0448.56 ▼0.92
Dashboard /wp-admin2,196 ▲195.55 ▼0.1392.06 ▼9.3241.94 ▼6.78
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0136.50 ▼1.1335.31 ▼7.69
Add New Post /wp-admin/post-new.php1,529 ▲323.70 ▲0.38669.41 ▼27.5761.50 ▼0.31
Media Library /wp-admin/upload.php1,404 ▲74.23 ▲0.0095.84 ▼28.8643.24 ▼6.74
Login Screen /wp-admin/options-general.php?page=cwlsm-options1,0802.8541.6428.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/login-screen-manager/inc/display.php+223
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Notice in wp-content/plugins/login-screen-manager/inc/admin.php+79
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× 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/login-screen-manager/inc/admin.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/login-screen-manager/login-screen-manager.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-screen-manager/inc/display.php:195

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=cwlsm-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

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: Please add images for these screenshots: #1 (A Login Screen), #2 (Option Page), #3 (Favicon)
The official readme.txt is a good inspiration

login-screen-manager/login-screen-manager.php 92% from 13 tests

The main PHP script in "Login Screen Manager" version 3.5.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 453 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin917 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript314037795
PHP3352483
PO File1111139

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued 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%
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

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.16MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/js/hv.png2.80KB7.32KB0.00%
screenshot-1.png44.03KB17.00KB▼ 61.39%
inc/images/hs.png2.62KB7.54KB0.00%
screenshot-2.png79.55KB26.96KB▼ 66.10%
inc/js/hs.png2.62KB7.54KB0.00%