84% roller

Code Review | Roller

WordPress plugin Roller scored84%from 54 tests.

About plugin

  • Plugin page: roller
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 9, 2015
  • Number of updates: 5
  • Update frequency: every 3.6 days
  • Top authors: sgrant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,252 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Roller
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.02 ▼6.67
Dashboard /wp-admin3.31 ▲0.0158.00 ▲5.12
Posts /wp-admin/edit.php3.36 ▲0.0152.78 ▲6.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.41 ▼3.45
Media Library /wp-admin/upload.php3.24 ▲0.0139.92 ▲8.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Roller
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.19 ▲0.901.80 ▼3.1443.85 ▼1.75
Dashboard /wp-admin2,211 ▲315.51 ▼0.1689.65 ▼12.3340.85 ▼2.51
Posts /wp-admin/edit.php2,113 ▲132.05 ▲0.0639.69 ▼2.2738.87 ▲6.07
Add New Post /wp-admin/post-new.php1,554 ▲923.31 ▼0.05651.83 ▲31.6763.49 ▲13.95
Media Library /wp-admin/upload.php1,419 ▲194.31 ▲0.03100.12 ▼4.0847.47 ▲2.91

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/roller/roller.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: dungeons and dragons, rpg, dice rolling, role playing, rolling...

roller/roller.php Passed 13 tests

This is the main PHP file of "Roller" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
51 characters long description:
Dice rolling and list selection for NPC generation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin224 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16171224

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin