10% video-overlayer

Code Review | Video Overlayer

WordPress plugin Video Overlayer scored10%from 54 tests.

About plugin

  • Plugin page: video-overlayer
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2012
  • Latest release: Sep 16, 2012
  • Number of updates: 12
  • Update frequency: every 0.8 days
  • Top authors: CobaltApps (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /4,411 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'cobalt_plugin_activate' not found or invalid function name

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.99ms] Passed 4 tests

A check of server-side resources used by Video Overlayer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.29 ▼1.10
Dashboard /wp-admin3.35 ▲0.0050.40 ▼14.30
Posts /wp-admin/edit.php3.40 ▲0.0449.03 ▼0.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.26 ▼32.24
Media Library /wp-admin/upload.php3.27 ▲0.0440.71 ▲6.67
Video Overlayer /wp-admin/options-general.php?page=video_overlayer_settings3.2433.37

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video Overlayer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.25 ▼0.292.34 ▲0.7740.47 ▲0.01
Dashboard /wp-admin2,199 ▲225.60 ▼0.0583.24 ▼8.7843.13 ▲4.59
Posts /wp-admin/edit.php2,104 ▲12.03 ▼0.0137.59 ▲0.8235.22 ▲0.23
Add New Post /wp-admin/post-new.php1,534 ▼123.08 ▲5.00704.18 ▲84.1354.88 ▼4.10
Media Library /wp-admin/upload.php1,404 ▲104.20 ▼0.02113.12 ▲7.1448.43 ▼0.68
Video Overlayer /wp-admin/options-general.php?page=video_overlayer_settings9041.8932.8130.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • video_overlayer_settings
    • video_overlayer_version_number
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/video-overlayer/video-overlayer.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-overlayer/functions/plugin-functions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-overlayer/functions/plugin-activate.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-overlayer/functions/plugin-admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Video Overlayer keeps things simple, yet provides just enough control to work the way you want it to.), #2 (You can overlay your iFrame video embeds with either the included images or your own custom image.)
Please take inspiration from this readme.txt

video-overlayer/video-overlayer.php 92% from 13 tests

"Video Overlayer" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 178 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
No dangerous file extensions were detected348 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP647143201
JavaScript215070
PO File1171746
CSS10031

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png77.49KB20.10KB▼ 74.06%
images/trans_overlay_image.png2.73KB0.09KB▼ 96.60%
images/default_overlay_black_old.png11.34KB3.75KB▼ 66.95%
images/default_overlay_black.png7.59KB2.42KB▼ 68.14%
images/default_overlay_white.png7.96KB2.42KB▼ 69.63%