90% wp-p5js-block

Code Review | p5.js Block

WordPress plugin p5.js Block scored90%from 54 tests.

About plugin

  • Plugin page: wp-p5js-block
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 7, 2019
  • Latest release: May 28, 2020
  • Number of updates: 5
  • Update frequency: every 67.0 days
  • Top authors: mapk (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /4,016 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by p5.js Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.77 ▼6.69
Dashboard /wp-admin3.32 ▲0.0158.94 ▲4.72
Posts /wp-admin/edit.php3.37 ▲0.0152.92 ▲7.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.71 ▼25.60
Media Library /wp-admin/upload.php3.24 ▲0.0137.96 ▲0.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for p5.js Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,030 ▲26922.15 ▲7.57174.60 ▲172.7742.55 ▼0.69
Dashboard /wp-admin2,198 ▲275.58 ▼0.0980.64 ▼18.5639.37 ▼5.76
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0637.21 ▼3.2335.48 ▼0.46
Add New Post /wp-admin/post-new.php6,201 ▲4,67218.87 ▲1.29867.76 ▲214.2438.25 ▼24.87
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0198.18 ▼13.8445.12 ▼1.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: generative art, p5js, visual data, processing, javascript

wp-p5js-block/plugin.php 92% from 13 tests

"p5.js Block" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-p5js-block.php" instead of "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
No dangerous file extensions were detected7,067 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,870
JavaScript584579
PHP2124954
Sass34141
Markdown19021
CSS2002

PHP code Passed 2 tests

This is a short overview 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.23
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin