84% responsive-p5js-for-wp

Code Review | Responsive P5JS for WP

WordPress plugin Responsive P5JS for WP scored84%from 54 tests.

About plugin

  • Plugin page: responsive-p5js-f...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 28, 2019
  • Latest release: May 6, 2022
  • Number of updates: 14
  • Update frequency: every 85.4 days
  • Top authors: cageehv (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.60ms] Passed 4 tests

Server-side resources used by Responsive P5JS for WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.78 ▼2.78
Dashboard /wp-admin3.34 ▲0.0446.24 ▼9.45
Posts /wp-admin/edit.php3.46 ▲0.1052.63 ▼0.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.29 ▼5.83
Media Library /wp-admin/upload.php3.27 ▲0.0434.01 ▼0.33
Responsive P5JS Instructions /wp-admin/options-general.php?page=p5js_settings_page3.2330.35

Server storage [IO: ▲0.06MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Responsive P5JS for WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.57 ▼0.748.53 ▲6.4043.90 ▼4.41
Dashboard /wp-admin2,209 ▲215.82 ▼0.04101.12 ▼22.0740.11 ▼8.91
Posts /wp-admin/edit.php2,095 ▲22.03 ▲0.0340.33 ▼3.7234.61 ▼8.05
Add New Post /wp-admin/post-new.php1,542 ▲2818.55 ▲0.87601.79 ▼42.2151.23 ▼2.84
Media Library /wp-admin/upload.php1,397 ▲94.20 ▼0.1997.39 ▲0.5444.60 ▲2.76
Responsive P5JS Instructions /wp-admin/options-general.php?page=p5js_settings_page9972.0223.2970.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-p5js-for-wp/responsive-p5js-for-wp.php:72
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/responsive-p5js-for-wp/admin/p5js_instructions.php:3

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 Passed 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: processing, p5js, html5, javascript, embed...

responsive-p5js-for-wp/responsive-p5js-for-wp.php Passed 13 tests

"Responsive P5JS for WP" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
47 characters long description:
Embed an existing P5JS sketch in a post or page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin296 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP358132214
CSS20143
JavaScript421939

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/p5js_uploads.png40.72KB18.44KB▼ 54.73%