89% disable-user-login

Code Review | Disable User Login

WordPress plugin Disable User Login scored89%from 54 tests.

About plugin

  • Plugin page: disable-user-login
  • Plugin version: 1.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 13, 2019
  • Latest release: Aug 11, 2023
  • Number of updates: 15
  • Update frequency: every 97.3 days
  • Top authors: anderly (93.33%)saintsystems (13.33%)

Code review

54 tests

User reviews

3 reviews

Install metrics

3,000+ active /30,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.09ms] Passed 4 tests

This is a short check of server-side resources used by Disable User Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.62 ▼0.81
Dashboard /wp-admin3.39 ▲0.0844.81 ▼0.26
Posts /wp-admin/edit.php3.50 ▲0.1445.52 ▼3.13
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.44 ▼4.15
Media Library /wp-admin/upload.php3.31 ▲0.0837.03 ▲0.67

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Disable User Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.21 ▼1.154.83 ▲2.9142.22 ▲3.21
Dashboard /wp-admin2,208 ▲204.89 ▲0.02100.64 ▼8.6641.10 ▼1.59
Posts /wp-admin/edit.php2,094 ▲52.02 ▲0.0135.77 ▼7.4032.52 ▼5.37
Add New Post /wp-admin/post-new.php1,542 ▲2218.29 ▼4.77626.99 ▼74.7047.74 ▼27.32
Media Library /wp-admin/upload.php1,396 ▲54.20 ▼0.0298.24 ▼6.6042.15 ▼3.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (User profile setting available to administrators.), #2 (Message when a disabled user tries to login.)
The official readme.txt is a good inspiration

disable-user-login/disable-user-login.php 85% from 13 tests

The entry point to "Disable User Login" version 1.3.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin529 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123254272
SVG212143
PO File1152271
JavaScript1111143

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods26
▷ Static methods311.54%
▷ Public methods2076.92%
▷ Protected methods00.00%
▷ Private methods623.08%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-500x500.png13.14KB6.20KB▼ 52.80%
assets/icon-128x128.png3.80KB2.24KB▼ 41.02%
assets/icon-256x256.png7.13KB3.74KB▼ 47.57%
assets/banner-772x250.png18.64KB8.06KB▼ 56.77%
assets/banner-1544x500.png37.11KB15.70KB▼ 57.68%