84% lazy-dm-roleplaying-session-planner

Code Review | Lazy DM Roleplaying Session Planner

WordPress plugin Lazy DM Roleplaying Session Planner scored84%from 54 tests.

About plugin

  • Plugin page: lazy-dm-roleplayi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Oct 10, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 7
  • Update frequency: every 25.7 days
  • Top authors: juanlucha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /527 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.00MB] [CPU: ▼8.46ms] Passed 4 tests

Analyzing server-side resources used by Lazy DM Roleplaying Session Planner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.27 ▼3.46
Dashboard /wp-admin3.32 ▼0.0350.77 ▼15.14
Posts /wp-admin/edit.php3.37 ▲0.0149.31 ▲2.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.25 ▼16.45
Media Library /wp-admin/upload.php3.24 ▲0.0138.50 ▲1.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazy DM Roleplaying Session Planner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.28 ▼0.091.63 ▼0.2145.84 ▲2.34
Dashboard /wp-admin2,198 ▲185.64 ▲0.0687.69 ▼12.9741.35 ▼7.02
Posts /wp-admin/edit.php2,097 ▼61.97 ▲0.0036.07 ▼3.5134.93 ▼2.44
Add New Post /wp-admin/post-new.php6,366 ▲4,83627.67 ▲4.44907.82 ▲280.6265.49 ▼1.48
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.00102.06 ▼1.3242.37 ▼2.26

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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)
Even though everything seems fine, this is not 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazy-dm-roleplaying-session-planner/lazy-dm-plugin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
5 plugin tags: block, dm, dnd, roleplaying, faterpg

lazy-dm-roleplaying-session-planner/lazy-dm-plugin.php 92% from 13 tests

The primary PHP file in "Lazy DM Roleplaying Session Planner" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lazy-dm-roleplaying-session-planner.php" instead of "lazy-dm-plugin.php")

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
Success! There were no dangerous files found in this plugin139 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON30054
JavaScript5107151
Sass23025
PHP22207
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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
1 PNG file occupies 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/lazy-dm.png130.17KB53.80KB▼ 58.67%