84% autorole

Code Review | Autorole

WordPress plugin Autorole scored84%from 54 tests.

About plugin

  • Plugin page: autorole
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Jul 26, 2022
  • Number of updates: 12
  • Update frequency: every 3.0 days
  • Top authors: autorole (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▼0.15MB] [CPU: ▼10.15ms] Passed 4 tests

This is a short check of server-side resources used by Autorole
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6118.04 ▼23.10
Dashboard /wp-admin3.31 ▲0.0143.64 ▼4.44
Posts /wp-admin/edit.php3.36 ▲0.0145.74 ▼4.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.54 ▼9.05
Media Library /wp-admin/upload.php3.24 ▲0.0132.93 ▼2.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Autorole: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼27914.45 ▼0.130.59 ▼1.1416.42 ▼28.38
Dashboard /wp-admin2,206 ▲185.91 ▲0.09109.27 ▲3.6138.21 ▼5.13
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0739.10 ▼1.0732.81 ▼2.59
Add New Post /wp-admin/post-new.php1,522 ▼223.16 ▼0.12612.73 ▼24.7765.18 ▲12.09
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0196.48 ▼10.8945.03 ▼0.58

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autorole/admin/partials/autorole-admin-display.php
    • > /wp-content/plugins/autorole/public/partials/autorole-public-display.php

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: discord, subscriptions, server, membership

autorole/autorole.php Passed 13 tests

"Autorole" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected216 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12133541210
JavaScript24546
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin