83% move-user-roles

Code Review | Move User Roles

WordPress plugin Move User Roles scored83%from 54 tests.

About plugin

  • Plugin page: move-user-roles
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2021
  • Latest release: Feb 23, 2022
  • Number of updates: 9
  • Update frequency: every 34.3 days
  • Top authors: alsvin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /490 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.73ms] Passed 4 tests

This is a short check of server-side resources used by Move User Roles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.01 ▼10.07
Dashboard /wp-admin3.36 ▲0.0645.21 ▼2.11
Posts /wp-admin/edit.php3.41 ▲0.0547.07 ▲1.23
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.14 ▲0.03
Media Library /wp-admin/upload.php3.28 ▲0.0534.63 ▲4.84
Move User Roles /wp-admin/tools.php?page=move-user-role-settings3.2529.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Move User Roles
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.44 ▼0.861.66 ▼0.4838.93 ▼6.07
Dashboard /wp-admin2,224 ▲335.20 ▼0.73112.98 ▲9.3438.27 ▼2.21
Posts /wp-admin/edit.php2,110 ▲212.44 ▲0.4039.71 ▲3.8734.18 ▲1.73
Add New Post /wp-admin/post-new.php1,531 ▼1123.29 ▲5.03652.50 ▲22.8637.66 ▼18.25
Media Library /wp-admin/upload.php1,406 ▲184.45 ▲0.2496.78 ▼0.8643.36 ▼0.59
Move User Roles /wp-admin/tools.php?page=move-user-role-settings1,2082.5941.3335.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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 Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/tools.php?page=move-user-role-settings
    • > Network (severe)
    wp-content/plugins/move-user-roles/img/switch.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: The official readme.txt is a good inspiration

move-user-roles/move-user-role.php 69% from 13 tests

The entry point to "Move User Roles" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.1" instead of "4.1")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("move-user-roles.php" instead of "move-user-role.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin823 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2104127485
PHP272120223
CSS21716115

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected