84% rpg-dice-roller

Code Review | RPG Dice Roller

WordPress plugin RPG Dice Roller scored84%from 54 tests.

About plugin

  • Plugin page: rpg-dice-roller
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: May 8, 2018
  • Number of updates: 10
  • Update frequency: every 103.0 days
  • Top authors: Threllous (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,021 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by RPG Dice Roller
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.19 ▼13.09
Dashboard /wp-admin3.32 ▼0.0248.82 ▼16.27
Posts /wp-admin/edit.php3.37 ▲0.0251.73 ▲0.21
Add New Post /wp-admin/post-new.php5.90 ▲0.02100.09 ▼3.63
Media Library /wp-admin/upload.php3.24 ▲0.0238.41 ▲2.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by RPG Dice Roller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.22 ▼0.991.81 ▼0.1441.38 ▼1.01
Dashboard /wp-admin2,203 ▲155.88 ▲1.02112.89 ▲5.0444.77 ▲1.12
Posts /wp-admin/edit.php2,089 ▼32.11 ▲0.0839.76 ▼1.3233.99 ▼2.00
Add New Post /wp-admin/post-new.php1,533 ▲523.46 ▲0.43624.87 ▼34.4854.72 ▲4.33
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.05100.37 ▼6.0043.17 ▼2.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_mh_rpg_dice_roller

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rpg-dice-roller/rpg-dice-roller.php

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)
No browser errors were detected

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
7 plugin tags: table top, dragons, star wars, dice, dungeons...

rpg-dice-roller/rpg-dice-roller.php Passed 13 tests

The primary PHP file in "RPG Dice Roller" version 1.2.1 is used by WordPress to initiate all plugin functionality
40 characters long description:
Dice roller designed for table top RPGs.

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 plugin161 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1173158
JavaScript117055
HTML28048

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin