74% wp-users-disable

Code Review | Disable User Login

WordPress plugin Disable User Login scored74%from 54 tests.

About plugin

  • Plugin page: wp-users-disable
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 8, 2016
  • Latest release: Sep 8, 2022
  • Number of updates: 32
  • Update frequency: every 71.3 days
  • Top authors: brainvireinfo (53.13%)hiren1094 (50%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /8,348 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.11MB] [CPU: ▼17.94ms] Passed 4 tests

This is a short check of server-side resources used by Disable User Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0237.33 ▼19.70
Dashboard /wp-admin3.32 ▲0.0247.62 ▼14.22
Posts /wp-admin/edit.php3.37 ▼0.4750.86 ▼17.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.09 ▼20.81
Media Library /wp-admin/upload.php3.25 ▲0.0139.64 ▲2.02
Block User /wp-admin/options-general.php?page=dwul-block-user-setting3.2447.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_dwul_disable_user_email
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Disable User Login: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.17 ▼0.091.85 ▲0.2848.56 ▼3.33
Dashboard /wp-admin2,201 ▲245.63 ▲0.0292.17 ▼15.7139.16 ▼10.72
Posts /wp-admin/edit.php2,109 ▲62.01 ▲0.0439.88 ▼3.2340.04 ▼2.16
Add New Post /wp-admin/post-new.php1,533 ▲523.19 ▲0.38701.26 ▲7.7860.08 ▲3.72
Media Library /wp-admin/upload.php1,406 ▲64.27 ▲0.10104.96 ▼16.4148.21 ▲0.94
Block User /wp-admin/options-general.php?page=dwul-block-user-setting8452.0130.2534.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dwul_disable_user_email
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please 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/wp-users-disable/custom-ajax.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-users-disable/init-field.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-users-disable/admin-option.php:226

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: users, wp admin disable, disable user, disable, disable register...

wp-users-disable/init-field.php 85% from 13 tests

The main PHP file in "Disable User Login" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-users-disable.php" instead of "init-field.php")
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin355 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP411055269
JavaScript133086

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity12.50
▷ Minimum class complexity7.00
▷ Maximum class complexity18.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin