WordPress plugin ACF: Dynamic User Role scored89%from 54 tests.

About plugin

  • Plugin page: change-default-ro...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 16, 2022
  • Latest release: Jul 24, 2023
  • Number of updates: 30
  • Update frequency: every 16.5 days
  • Top authors: mikekipruto (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.02ms] Passed 4 tests

This is a short check of server-side resources used by ACF: Dynamic User Role
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.81 ▼4.93
Dashboard /wp-admin3.32 ▲0.0146.30 ▼10.80
Posts /wp-admin/edit.php3.37 ▲0.0148.10 ▲1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.31 ▼13.53
Media Library /wp-admin/upload.php3.24 ▲0.0131.36 ▼2.80

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ACF: Dynamic User Role
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.44 ▼1.121.81 ▼0.4340.35 ▼2.95
Dashboard /wp-admin2,209 ▲215.88 ▲1.0197.43 ▼11.2038.54 ▼2.62
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0138.20 ▼1.1435.85 ▲1.23
Add New Post /wp-admin/post-new.php1,534 ▲123.28 ▲0.06663.78 ▼16.2466.70 ▲18.11
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0596.59 ▼9.0743.47 ▼0.74

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (This screen shot shows the language dropdown that will be hidden when this plugin is enabled.)
You can take inspiration from this readme.txt

change-default-role-dynamically-acf-role-based-conditions-on-user-new-edit-form/acf-dynamic-change-on-user-creation.php 92% from 13 tests

This is the main PHP file of "ACF: Dynamic User Role" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("change-default-role-dynamically-acf-role-based-conditions-on-user-new-edit-form.php" instead of "acf-dynamic-change-on-user-creation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16765

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin