84% disable-users

Code Review | Disable Users

WordPress plugin Disable Users scored84%from 54 tests.

About plugin

  • Plugin page: disable-users
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Nov 11, 2015
  • Number of updates: 18
  • Update frequency: every 108.7 days
  • Top authors: jaredatch (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

3,000+ active /35,991 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.92ms] Passed 4 tests

This is a short check of server-side resources used by Disable Users
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.37 ▼3.37
Dashboard /wp-admin3.34 ▼0.0149.47 ▼9.43
Posts /wp-admin/edit.php3.39 ▲0.0346.70 ▼0.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.30 ▲1.23
Media Library /wp-admin/upload.php3.26 ▲0.0336.27 ▲4.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Users
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.80 ▲0.402.07 ▲0.4443.51 ▲0.47
Dashboard /wp-admin2,206 ▲204.86 ▼1.20107.41 ▼2.6042.40 ▲0.36
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0149.26 ▲13.5634.50 ▼2.63
Add New Post /wp-admin/post-new.php1,514 ▼017.65 ▲0.10586.43 ▼96.0064.89 ▲5.46
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0294.78 ▼7.8341.88 ▼3.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 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/disable-users/init.php:38

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 96% 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
3 plugin tags: login, users, disable

disable-users/init.php 92% from 13 tests

Analyzing the main PHP file in "Disable Users" version 1.0.5
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("disable-users.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1239286
PO File14424

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin