90% user-role-for-flamingo

Code Review | User Role for Flamingo

WordPress plugin User Role for Flamingo scored90%from 54 tests.

About plugin

  • Plugin page: user-role-for-fla...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 3
  • Update frequency: every 125.0 days
  • Top authors: yannickzipf (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,194 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.74ms] Passed 4 tests

Analyzing server-side resources used by User Role for Flamingo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.18 ▼3.10
Dashboard /wp-admin3.40 ▲0.0947.88 ▼3.12
Posts /wp-admin/edit.php3.52 ▲0.1552.29 ▲2.30
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.61 ▼15.04
Media Library /wp-admin/upload.php3.32 ▲0.0936.63 ▲3.36
Flamingo User Role /wp-admin/users.php?page=ur4f3.3732.06

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
ur4f_version
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for User Role for Flamingo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.37 ▲0.051.71 ▲0.0037.03 ▼6.68
Dashboard /wp-admin2,196 ▲165.59 ▼0.0694.75 ▲1.5542.51 ▼3.29
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0538.55 ▼1.4935.02 ▼1.10
Add New Post /wp-admin/post-new.php1,529 ▲422.86 ▼0.80666.37 ▲69.5760.85 ▲13.04
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.0395.94 ▲2.4640.31 ▼1.60
Flamingo User Role /wp-admin/users.php?page=ur4f9362.0026.2829.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 | 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: forms, user role, flamingo, contact form 7, capabilities

user-role-for-flamingo/user-role-for-flamingo.php Passed 13 tests

The main file in "User Role for Flamingo" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
99 characters long description:
Configure special user role to access the flamingo contacts and messages wihtout admin permissions.

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
No dangerous file extensions were detected541 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP870240374
PO File13341167

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.20
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin