52% loginplus

Code Review | Loginplus

WordPress plugin Loginplus scored52%from 54 tests.

About plugin

  • Plugin page: loginplus
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Dec 23, 2022
  • Number of updates: 15
  • Update frequency: every 129.3 days
  • Top authors: sanjaysolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /844 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼35.89ms] Passed 4 tests

An overview of server-side resources used by Loginplus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.14 ▼5.50
Dashboard /wp-admin3.00 ▼0.3021.32 ▼31.65
Posts /wp-admin/edit.php3.01 ▼0.3523.99 ▼23.44
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.21 ▼73.43
Media Library /wp-admin/upload.php3.01 ▼0.2220.19 ▼15.04
Hacking Attempts /wp-admin/admin.php?page=login_plus_sphacking3.0123.85
Settings /wp-admin/admin.php?page=login_plus_spsettings3.0124.37
Change Logo /wp-admin/admin.php?page=login_plus_splogo3.0120.45
Login Plus /wp-admin/admin.php?page=login_plus_sphome3.0124.61

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_sp_login_details
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
login_plus_sp

Browser metrics Passed 4 tests

Loginplus: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲23914.84 ▲0.281.52 ▼0.2740.91 ▼3.20
Dashboard /wp-admin2,383 ▲1956.48 ▲0.60135.62 ▲31.7340.26 ▼0.80
Posts /wp-admin/edit.php2,283 ▲1943.58 ▲1.5855.01 ▲13.6335.16 ▼1.79
Add New Post /wp-admin/post-new.php1,549 ▲3523.18 ▲5.52642.39 ▲36.5835.97 ▼13.33
Media Library /wp-admin/upload.php1,419 ▲314.17 ▼0.0878.39 ▼33.7744.89 ▼0.33
Hacking Attempts /wp-admin/admin.php?page=login_plus_sphacking1,0273.1836.7827.66
Settings /wp-admin/admin.php?page=login_plus_spsettings1,1053.0937.6728.65
Change Logo /wp-admin/admin.php?page=login_plus_splogo1,1043.2037.0825.55
Login Plus /wp-admin/admin.php?page=login_plus_sphome1,1373.1840.3246.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie tables detected upon uninstall: 1 table
    • wp_sp_login_details
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • login_plus_sp

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=login_plus_sphome
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=login_plus_spsettings
    • > Notice in wp-content/plugins/loginplus/apps/settings.php+7
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=login_plus_splogo
    • > Notice in wp-content/plugins/loginplus/apps/logo.php+56
    Undefined index: imageUrl

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loginplus/loginplus.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=login_plus_sphome
    • > Network (severe)
    wp-content/plugins/loginplus/media-lib-uploader.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screen shot 1), #2 (Screen shot 2), #3 (Screen shot 3), #4 (Screen shot 4)
The official readme.txt is a good inspiration

loginplus/loginplus.php 85% from 13 tests

The entry point to "Loginplus" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Success! There were no dangerous files found in this plugin875 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP78839649
CSS1170141
JavaScript1101085

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity5.40
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.61MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png29.06KB12.11KB▼ 58.34%
assets/screenshot-1.png66.06KB30.27KB▼ 54.18%
banner-772x250.png130.03KB32.36KB▼ 75.11%
assets/screenshot-3.png21.56KB8.43KB▼ 60.91%
icon-128x128.png4.34KB2.32KB▼ 46.55%