68% bulk-role-change

Code Review | Bulk Change Role

WordPress plugin Bulk Change Role scored68%from 54 tests.

About plugin

  • Plugin page: bulk-role-change
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Jul 13, 2016
  • Number of updates: 17
  • Update frequency: every 0.4 days
  • Top authors: webxmedia (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /2,464 total downloads

Benchmarks

Plugin footprint 65% 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.94MB] [CPU: ▼35.11ms] Passed 4 tests

Analyzing server-side resources used by Bulk Change Role
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.32 ▲2.28
Dashboard /wp-admin3.01 ▼0.3023.38 ▼27.64
Posts /wp-admin/edit.php3.01 ▼0.3523.38 ▼26.68
Add New Post /wp-admin/post-new.php3.01 ▼2.8826.69 ▼72.58
Media Library /wp-admin/upload.php3.01 ▼0.2225.15 ▼13.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bulk Change Role
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.28 ▼0.381.79 ▲0.1446.60 ▼0.14
Dashboard /wp-admin2,203 ▲295.67 ▲0.0998.46 ▲5.8442.49 ▼4.03
Posts /wp-admin/edit.php2,108 ▲112.00 ▲0.0136.82 ▼1.9333.84 ▼1.57
Add New Post /wp-admin/post-new.php1,535 ▲922.90 ▼0.14655.51 ▼41.4456.44 ▲2.60
Media Library /wp-admin/upload.php1,411 ▲114.21 ▲0.0198.80 ▼18.2748.09 ▲0.94
Bulk change role /wp-admin/bulk_change_role_page.php260.420.1313.98

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
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, 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 50% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-role-change/includes/admin-enqueue-scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-role-change/includes/admin-enqueue-scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-role-change/includes/view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-role-change/includes/ajax.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/bulk_change_role_page.php
    • > Network (severe)
    wp-admin/bulk_change_role_page.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: role, migrate, users, transfer, reassign

bulk-role-change/w3dev-bulk-role-change.php 92% from 13 tests

The primary PHP file in "Bulk Change Role" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bulk-role-change.php" instead of "w3dev-bulk-role-change.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin313 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS114122
PHP42415121
JavaScript13870

PHP code Passed 2 tests

An short overview of 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.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.63MB with 0.44MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png154.83KB48.48KB▼ 68.69%
screenshot-2.png162.23KB50.76KB▼ 68.71%
screenshot-4.png166.77KB51.06KB▼ 69.38%
screenshot-3.png164.70KB51.09KB▼ 68.98%