78% supaz-easy-background

Code Review | Supaz Easy Background - Easy way to add parallax image or video background

WordPress plugin Supaz Easy Background - Easy way to add parallax image or video background scored78%from 54 tests.

About plugin

  • Plugin page: supaz-easy-backgr...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Dec 20, 2017
  • Latest release: Oct 11, 2018
  • Number of updates: 5
  • Update frequency: every 59.6 days
  • Top authors: supazthemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲1.11ms] Passed 4 tests

A check of server-side resources used by Supaz Easy Background - Easy way to add parallax image or video background
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0845.49 ▲1.25
Dashboard /wp-admin3.41 ▲0.1155.92 ▲3.67
Posts /wp-admin/edit.php3.52 ▲0.1755.07 ▲1.99
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.85 ▼2.46
Media Library /wp-admin/upload.php3.31 ▲0.0840.34 ▲4.45
About Us /wp-admin/edit.php?post_type=seb_posts&page=about-us3.3837.60
Supaz Easy Backgrounds /wp-admin/edit.php?post_type=seb_posts3.3842.65
Add New /wp-admin/post-new.php?post_type=seb_posts3.4749.54

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Supaz Easy Background - Easy way to add parallax image or video background: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲22814.65 ▲0.271.81 ▲0.2647.62 ▲5.78
Dashboard /wp-admin2,392 ▲2156.48 ▲0.86102.31 ▲14.5635.18 ▼5.68
Posts /wp-admin/edit.php2,324 ▲2243.58 ▲1.5349.18 ▲8.1130.42 ▼8.35
Add New Post /wp-admin/post-new.php1,576 ▲3417.66 ▼0.74605.61 ▼29.7734.09 ▼19.03
Media Library /wp-admin/upload.php1,460 ▲574.27 ▲0.0087.92 ▼13.3142.73 ▼0.88
About Us /wp-admin/edit.php?post_type=seb_posts&page=about-us1,5383.2744.51118.09
Supaz Easy Backgrounds /wp-admin/edit.php?post_type=seb_posts1,3203.6647.8934.27
Add New /wp-admin/post-new.php?post_type=seb_posts2,3314.5190.3868.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 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
Please fix the following
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/supaz-easy-background/supaz-easy-background.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/seb-admin.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/seb-metabox.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/seb-enqueue.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/seb-post-type/seb-custom-post-type.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/seb-init.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/seb-post-type/seb-meta-box/seb-meta-box.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/seb-library.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/seb-post-type/seb-meta-box/seb-meta-saves.php
    • > /wp-content/plugins/supaz-easy-background/inc/classes/admin/about.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=seb_posts
    • > Javascript (severe) in unknown
    /wp-content/plugins/supaz-easy-background/js/wp-color-picker-alpha.js?ver=1.0.2 10:459 Uncaught ReferenceError: wpColorPickerL10n is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: background, parallax background, image background, video background, easy background...

supaz-easy-background/supaz-easy-background.php 85% from 13 tests

The main PHP file in "Supaz Easy Background - Easy way to add parallax image or video background" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Plugin Name: Please shorten the plugin name (currently 74 characters long instead of max. 70)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,517 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5147116802
PHP117123540
CSS4438175

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.31MB with 0.20MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tnt-banner.png188.87KB68.03KB▼ 63.98%
images/insta-banner.png128.35KB43.15KB▼ 66.38%