78% background-particle-js

Code Review | Background with Particle.js

WordPress plugin Background with Particle.js scored78%from 54 tests.

About plugin

  • Plugin page: background-partic...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Mar 2, 2022
  • Number of updates: 10
  • Update frequency: every 51.6 days
  • Top authors: maherhossain (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /5,659 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.06MB] [CPU: ▼6.86ms] Passed 4 tests

Analyzing server-side resources used by Background with Particle.js
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.09 ▼4.05
Dashboard /wp-admin3.39 ▲0.0555.35 ▼14.74
Posts /wp-admin/edit.php3.44 ▲0.0948.25 ▼0.86
Add New Post /wp-admin/post-new.php6.00 ▲0.1188.75 ▼7.79
Media Library /wp-admin/upload.php3.31 ▲0.0939.73 ▲3.05
Additional Info /wp-admin/admin.php?page=theme-op-settings3.3128.96
ParticleJS Banner /wp-admin/admin.php?page=particlejs-banner3.3144.53

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

Browser metrics Passed 4 tests

An overview of browser requirements for Background with Particle.js
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲19113.98 ▼0.4211.52 ▲9.7944.45 ▲1.90
Dashboard /wp-admin2,248 ▲474.93 ▲0.00114.70 ▼2.6841.21 ▼2.13
Posts /wp-admin/edit.php2,127 ▲272.05 ▲0.0535.83 ▼2.2633.37 ▼0.72
Add New Post /wp-admin/post-new.php1,549 ▲1823.15 ▼0.27673.92 ▼26.7559.63 ▲9.18
Media Library /wp-admin/upload.php1,430 ▲304.22 ▲0.01106.97 ▲4.9244.78 ▼1.37
Additional Info /wp-admin/admin.php?page=theme-op-settings9382.0423.2332.54
ParticleJS Banner /wp-admin/admin.php?page=particlejs-banner1,3441.7225.4434.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • 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 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/background-particle-js/settings/options.php
    • > /wp-content/plugins/background-particle-js/shortcode.php
    • > /wp-content/plugins/background-particle-js/index.php
    • > /wp-content/plugins/background-particle-js/particle.php
    • > /wp-content/plugins/background-particle-js/settings/main-navigation.php
    • > /wp-content/plugins/background-particle-js/settings/submenu-settings.php
    • > /wp-content/plugins/background-particle-js/config/init.php
    • > /wp-content/plugins/background-particle-js/settings/menu-settings.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/background-particle-js/particle-page.php:5

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

background-particle-js/particle.php 92% from 13 tests

This is the main PHP file of "Background with Particle.js" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("background-particle-js.php" instead of "particle.php")

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
There were no executable files found in this plugin469 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP910186402
CSS28038
JavaScript36029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.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
There were not PNG files found in your plugin