83% tsparticles-block

Code Review | tsParticles WP Block

WordPress plugin tsParticles WP Block scored83%from 54 tests.

About plugin

  • Plugin page: tsparticles-block
  • Plugin version: 2.11.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2022
  • Latest release: Jul 14, 2023
  • Number of updates: 35
  • Update frequency: every 8.4 days
  • Top authors: matteobruni (65.71%)Ar3sHack (37.14%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,741 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼11.31ms] Passed 4 tests

Analyzing server-side resources used by tsParticles WP Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0839.32 ▼4.85
Dashboard /wp-admin3.41 ▲0.0349.67 ▼16.56
Posts /wp-admin/edit.php3.46 ▲0.0750.78 ▼3.18
Add New Post /wp-admin/post-new.php6.01 ▲0.0886.41 ▼20.64
Media Library /wp-admin/upload.php3.34 ▲0.0740.52 ▲4.14

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 105 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

tsParticles WP Block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.25 ▼0.021.73 ▼0.2945.44 ▲2.87
Dashboard /wp-admin2,198 ▲245.63 ▲0.0393.68 ▼9.7337.25 ▼6.88
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0241.01 ▲3.8734.52 ▼1.29
Add New Post /wp-admin/post-new.php6,416 ▲4,89022.58 ▼0.661,143.75 ▲430.7866.44 ▲14.93
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.05106.76 ▲2.1446.55 ▲3.72

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 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/tsparticles-block/wordpress-particles.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

tsparticles-block/wordpress-particles.php 85% from 13 tests

The entry point to "tsParticles WP Block" version 2.11.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("tsparticles-block.php" instead of "wordpress-particles.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin627 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
JSON200519
JavaScript900090
PHP332116
CSS2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.72MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png151.87KB65.65KB▼ 56.77%
assets/screenshot-1.png74.79KB32.91KB▼ 56.00%
assets/banner-1544x500.png510.92KB168.88KB▼ 66.94%