84% easy-p5-js-block

Code Review | Easy p5.js Block

WordPress plugin Easy p5.js Block scored84%from 54 tests.

About plugin

  • Plugin page: easy-p5-js-block
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Mar 23, 2023
  • Number of updates: 8
  • Update frequency: every 21.5 days
  • Top authors: florianrieder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /372 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Easy p5.js Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.22 ▲0.74
Dashboard /wp-admin3.32 ▲0.0249.54 ▼10.85
Posts /wp-admin/edit.php3.37 ▲0.0150.90 ▼1.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.97 ▲1.87
Media Library /wp-admin/upload.php3.24 ▲0.0137.15 ▲3.57

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy p5.js Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲31322.57 ▲7.81172.33 ▲170.2681.36 ▲33.00
Dashboard /wp-admin2,209 ▲215.83 ▼0.0288.37 ▼22.4538.36 ▼2.87
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0541.75 ▲3.0836.88 ▲4.91
Add New Post /wp-admin/post-new.php6,186 ▲4,65326.31 ▲3.15826.51 ▲150.2735.19 ▼17.59
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0398.84 ▼4.9244.29 ▼2.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-p5-js-block/gutenbergp5.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: javascript, generative art, block, p5js, creative coding...

easy-p5-js-block/gutenbergp5.php 85% from 13 tests

The main PHP script in "Easy p5.js Block" version 1.1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-p5-js-block.php" instead of "gutenbergp5.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected81 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON10042
JavaScript22421
PHP222616
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin