84% mass-disable-users

Code Review | Mass-Disable Users plugin for WordPress

WordPress plugin Mass-Disable Users plugin for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: mass-disable-users
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2012
  • Latest release: Dec 7, 2012
  • Number of updates: 18
  • Update frequency: every 1.7 days
  • Top authors: channeleaton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.40ms] Passed 4 tests

Analyzing server-side resources used by Mass-Disable Users plugin for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.43 ▼1.25
Dashboard /wp-admin3.36 ▲0.0647.61 ▲2.11
Posts /wp-admin/edit.php3.47 ▲0.1249.94 ▼0.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0798.44 ▼7.17
Media Library /wp-admin/upload.php3.28 ▲0.0536.16 ▼0.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
mdu_email_exceptions
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mass-Disable Users plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.65 ▼0.734.22 ▲1.8543.75 ▼8.02
Dashboard /wp-admin2,206 ▲155.85 ▲0.9598.12 ▼4.0044.61 ▼0.53
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0340.87 ▲0.5137.30 ▲3.24
Add New Post /wp-admin/post-new.php1,533 ▼221.04 ▼2.11626.60 ▼70.2849.05 ▼13.39
Media Library /wp-admin/upload.php1,391 ▼04.19 ▲0.0296.20 ▼8.7240.60 ▼5.52

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • mdu_email_exceptions
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× 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/mass-disable-users/mass-disable-users.php:26
    • > PHP Warning
      require_once(ABSPATH/wp-content/plugins/mass-disable-users/mass-disable-users.php): failed to open stream: No such file or directory in wp-content/plugins/mass-disable-users/tests/mass-disable-users-test.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-content/plugins/mass-disable-users/mass-disable-users.php' (include_path='.:/usr/share/php') in wp-content/plugins/mass-disable-users/tests/mass-disable-users-test.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mass-disable-users/tests/mass-disable-users-test.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: users, multisite

mass-disable-users/mass-disable-users.php Passed 13 tests

The principal PHP file in "Mass-Disable Users plugin for WordPress" v. 0.1 is loaded by WordPress automatically on each request
93 characters long description:
Allows network administrators to disable users via CSV while retaining all author information

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
Success! There were no dangerous files found in this plugin552 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4310212544
JavaScript1218

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods4279.25%
▷ Protected methods00.00%
▷ Private methods1120.75%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected