72% swap-snow-fall

Code Review | Particle WordPress Backgrounds

WordPress plugin Particle WordPress Backgrounds scored72%from 54 tests.

About plugin

  • Plugin page: swap-snow-fall
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Dec 28, 2021
  • Number of updates: 44
  • Update frequency: every 22.9 days
  • Top authors: swapnild (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /5,257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▲1.33ms] Passed 4 tests

This is a short check of server-side resources used by Particle WordPress Backgrounds
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2743.44 ▲4.08
Dashboard /wp-admin3.57 ▲0.2751.55 ▲5.74
Posts /wp-admin/edit.php3.68 ▲0.3347.98 ▼3.23
Add New Post /wp-admin/post-new.php6.25 ▲0.3695.58 ▲2.63
Media Library /wp-admin/upload.php3.49 ▲0.2637.91 ▲1.83
Add New /wp-admin/post-new.php?post_type=ssf_particle_hook6.1982.03
All Particle Hooks /wp-admin/edit.php?post_type=ssf_particle_hook3.5338.20
Full Page Settings /wp-admin/edit.php?post_type=ssf_particle_hook&page=swap-snow-fall3.4632.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
_swap_snow_fall_db_version
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Particle WordPress Backgrounds
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.43 ▼0.961.71 ▲0.1344.39 ▼1.53
Dashboard /wp-admin2,263 ▲725.13 ▲0.30100.32 ▼1.8238.67 ▼5.28
Posts /wp-admin/edit.php2,148 ▲622.52 ▲0.5341.84 ▲1.1135.69 ▼2.09
Add New Post /wp-admin/post-new.php1,558 ▲4423.35 ▲5.85601.57 ▼90.2034.13 ▼23.27
Media Library /wp-admin/upload.php1,445 ▲574.50 ▲0.2598.37 ▼0.2742.02 ▼3.14
Add New /wp-admin/post-new.php?post_type=ssf_particle_hook1,56117.59975.2728.70
All Particle Hooks /wp-admin/edit.php?post_type=ssf_particle_hook1,1092.2738.7331.37
Full Page Settings /wp-admin/edit.php?post_type=ssf_particle_hook&page=swap-snow-fall1,2162.2651.4131.43

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • _swap_snow_fall_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/swap-snow-fall/classes/admin/class-ssf-menu.php
    • > /wp-content/plugins/swap-snow-fall/classes/class-ssf-frontend.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SSF_URL - assumed 'SSF_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/swap-snow-fall/custom-hook/class-ssf-custom-hook-post-type.php on line 9
    • > PHP Warning
      Use of undefined constant SSF_DIR - assumed 'SSF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/swap-snow-fall/custom-hook/class-ssf-custom-hook-post-type.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/swap-snow-fall/classes/class-ssf-loader.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swap-snow-fall/custom-hook/class-ssf-custom-hook-post-type.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/swap-snow-fall/classes/class-ssf-helper.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/swap-snow-fall/swap-snow-fall.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Block_Parser' not found in wp-content/plugins/swap-snow-fall/custom-hook/includes/class-ssf-wp-block-parser.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SSF_Page_Builder_Compatibility' not found in wp-content/plugins/swap-snow-fall/classes/compatibility/class-ssf-gutenberg-compatibility.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=ssf_particle_hook
    • > Console-api (warning) in unknown
    /wp-includes/js/dist/block-editor.min.js?ver=0cd49e3f951fc97cabb7 25:219944 "ssf-block-editor-styles-css was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe." link#ssf-block-editor-styles-css
    • > GET request to /wp-admin/post-new.php?post_type=ssf_particle_hook
    • > Console-api (warning) in unknown
    /wp-includes/js/dist/block-editor.min.js?ver=0cd49e3f951fc97cabb7 25:219944 "ssf-block-editor-styles-inline-css was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe." style#ssf-block-editor-styles-inline-css

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: customize background, particle js, backgrounds, snow effect, background...

swap-snow-fall/swap-snow-fall.php 92% from 13 tests

The main PHP file in "Particle WordPress Backgrounds" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 235 characters long)

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 detected3,369 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74942931,954
PHP101944931,316
CSS29899

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity23.12
▷ Minimum class complexity2.00
▷ Maximum class complexity62.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods52
▷ Static methods713.46%
▷ Public methods5096.15%
▷ Protected methods00.00%
▷ Private methods23.85%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin