83% simple-video-background-block

Code Review | Simple Video Background Block

WordPress plugin Simple Video Background Block scored83%from 54 tests.

About plugin

  • Plugin page: simple-video-back...
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9
  • WordPress version: 6.3.1
  • First release: May 27, 2022
  • Latest release: May 27, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: aykanburcak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /313 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Simple Video Background Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.61 ▼3.40
Dashboard /wp-admin3.31 ▲0.0141.94 ▼4.61
Posts /wp-admin/edit.php3.36 ▲0.0146.44 ▼1.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.18 ▼18.21
Media Library /wp-admin/upload.php3.24 ▲0.0133.28 ▲0.60

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Simple Video Background Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.19 ▼1.191.49 ▼0.1237.09 ▼7.00
Dashboard /wp-admin2,206 ▲184.85 ▼0.05112.39 ▲11.5343.58 ▲1.27
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0638.78 ▼2.4134.87 ▼2.65
Add New Post /wp-admin/post-new.php6,354 ▲4,81227.75 ▲9.65843.13 ▲239.6647.93 ▼6.86
Media Library /wp-admin/upload.php1,385 ▼04.18 ▲0.03100.77 ▲2.0942.96 ▼2.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-video-background-block/video-background.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: youtube, background, block

simple-video-background-block/video-background.php 69% from 13 tests

"Simple Video Background Block" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-video-background-block.php" instead of "video-background.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "5.8")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.3" instead of "7.0")

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
Good job! No executable or dangerous file extensions detected40 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON10024
PHP222113
CSS2002
JavaScript1001

PHP code Passed 2 tests

Analyzing 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.17
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin