84% light-particles

Code Review | Light Particles

WordPress plugin Light Particles scored84%from 54 tests.

About plugin

  • Plugin page: light-particles
  • Plugin version: 1.02
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 16
  • Update frequency: every 54.4 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /776 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
Installer ran successfully

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

An overview of server-side resources used by Light Particles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.76 ▼1.03
Dashboard /wp-admin3.35 ▼0.0052.83 ▼13.37
Posts /wp-admin/edit.php3.47 ▲0.1050.70 ▲2.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.51 ▼19.63
Media Library /wp-admin/upload.php3.25 ▲0.0234.42 ▼0.61
Light Particles settings /wp-admin/options-general.php?page=wp_particles_settings3.2636.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
wp_particles_opacity
can_compress_scripts
wp_particles_display_on
widget_recent-posts
wp_particles_quantity
db_upgraded
wp_particles_speed
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Light Particles
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲29215.24 ▲0.7610.58 ▲8.6341.28 ▼2.73
Dashboard /wp-admin2,341 ▲1646.15 ▲0.63118.64 ▲14.3041.59 ▼3.14
Posts /wp-admin/edit.php2,266 ▲1663.27 ▲1.3251.59 ▲16.6732.96 ▼1.97
Add New Post /wp-admin/post-new.php1,544 ▲1823.35 ▲0.28594.14 ▼106.7532.56 ▼19.44
Media Library /wp-admin/upload.php1,409 ▲94.03 ▼0.2183.89 ▼18.8640.26 ▼4.68
Light Particles settings /wp-admin/options-general.php?page=wp_particles_settings1,0373.0740.2152.60

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/light-particles/light-particles.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/light-particles/views/settings.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: point, light, spark, disc, particle...

light-particles/light-particles.php 85% from 13 tests

This is the main PHP file of "Light Particles" version 1.02, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")

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
Success! There were no dangerous files found in this plugin204 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23017128
JavaScript1171168
CSS2008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/save.png0.54KB0.39KB▼ 28.11%
images/shop.png19.89KB7.40KB▼ 62.81%
images/pro_version.png26.43KB9.33KB▼ 64.70%