68% slazzer-background-changer

Code Review | Slazzer Background Changer

WordPress plugin Slazzer Background Changer scored68%from 54 tests.

About plugin

  • Plugin page: slazzer-backgroun...
  • Plugin version: 3.10
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2020
  • Latest release: Sep 28, 2023
  • Number of updates: 109
  • Update frequency: every 10.6 days
  • Top authors: slazzercom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /10,477 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.73ms] Passed 4 tests

Analyzing server-side resources used by Slazzer Background Changer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1644.26 ▲4.21
Dashboard /wp-admin3.47 ▲0.1253.63 ▼5.90
Posts /wp-admin/edit.php3.58 ▲0.2249.62 ▼0.76
Add New Post /wp-admin/post-new.php6.07 ▲0.1893.29 ▼11.48
Media Library /wp-admin/upload.php3.39 ▲0.1635.54 ▼0.77

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 43 new files
Database: 2 new tables, 6 new options
New tables
wp_wc_slazzer_process_status
wp_wc_slazzer_process_history
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Slazzer Background Changer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲13313.57 ▼0.788.33 ▲6.6244.89 ▲0.43
Dashboard /wp-admin2,221 ▲475.71 ▲0.1486.44 ▼3.2437.65 ▼2.01
Posts /wp-admin/edit.php2,129 ▲262.24 ▲0.2534.83 ▼2.6335.14 ▼1.47
Add New Post /wp-admin/post-new.php1,560 ▲3418.64 ▼4.69590.15 ▼84.7067.71 ▲9.15
Media Library /wp-admin/upload.php1,432 ▲324.33 ▲0.1594.87 ▼7.6140.39 ▼5.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wc_slazzer_process_status
    • wp_wc_slazzer_process_history
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/slazzer-background-changer/public/partials/slazzer-background-changer-public-display.php
    • > /wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer_script_js.php
    • > /wp-content/plugins/slazzer-background-changer/admin/partials/slazzer-background-changer-admin-display.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer-delete_backup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer-restore_backup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer-single_image_process.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer_script_js.php:210
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer-get_all_image_ids.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer_plugin_ui.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slazzer-background-changer/includes/slazzer-background-changer-save-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (banner.png), #2 (screenshot-1.png), #3 (screenshot-2.png), #4 (screenshot-3.png), #5 (screenshot-4.png)
The official readme.txt is a good inspiration

slazzer-background-changer/slazzer-background-changer.php 92% from 13 tests

This is the main PHP file of "Slazzer Background Changer" version 3.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,242 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP228455901,542
JavaScript253141468
CSS22007232

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png11.19KB5.58KB▼ 50.12%
icon-128x128.png4.84KB2.82KB▼ 41.71%
assets/icon-128x128.png4.84KB2.82KB▼ 41.71%
icon-256x256.png11.19KB5.58KB▼ 50.12%
assets/icon-256x256.png11.19KB5.58KB▼ 50.12%