90% lock-user-account

Code Review | Lock User Account

WordPress plugin Lock User Account scored90%from 54 tests.

About plugin

  • Plugin page: lock-user-account
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Oct 21, 2023
  • Number of updates: 56
  • Update frequency: every 42.9 days
  • Top authors: babatechs (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /19,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.21ms] Passed 4 tests

Analyzing server-side resources used by Lock User Account
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.52 ▼6.15
Dashboard /wp-admin3.34 ▲0.0446.44 ▼3.20
Posts /wp-admin/edit.php3.40 ▲0.0449.57 ▲1.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.66 ▼1.91
Media Library /wp-admin/upload.php3.27 ▲0.0436.02 ▼1.56

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Lock User Account: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.221.73 ▼0.1041.36 ▲1.19
Dashboard /wp-admin2,198 ▲245.59 ▲0.0690.54 ▲5.6840.29 ▼4.90
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0139.35 ▼2.6734.78 ▼1.46
Add New Post /wp-admin/post-new.php1,535 ▲917.98 ▼5.05588.61 ▼79.8263.25 ▼0.68
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0998.73 ▼14.8542.95 ▼5.93

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: users, disable user, lock account, block user, lock user...

lock-user-account/lock-user-account.php 92% from 13 tests

Analyzing the main PHP file in "Lock User Account" version 1.0.5
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected130 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP440100130

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.60
Average class complexity8.67
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png17.52KB6.65KB▼ 62.03%
assets/screenshot-1.png15.04KB5.84KB▼ 61.13%
assets/screenshot-4.png23.76KB9.65KB▼ 59.38%
assets/banner-1544x500-rtl.png91.00KB31.84KB▼ 65.01%
assets/screenshot-2.png8.55KB3.26KB▼ 61.80%