66% tube-video-ads-lite

Code Review | Tube Video Ads Lite

WordPress plugin Tube Video Ads Lite scored66%from 54 tests.

About plugin

  • Plugin page: tube-video-ads-lite
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2014
  • Latest release: Jul 30, 2014
  • Number of updates: 7
  • Update frequency: every 5.4 days
  • Top authors: gualdoni (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /8,117 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.62MB] [CPU: ▼16.75ms] Passed 4 tests

An overview of server-side resources used by Tube Video Ads Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.21 ▼6.27
Dashboard /wp-admin3.37 ▲0.0748.32 ▼0.36
Posts /wp-admin/edit.php3.42 ▲0.0745.84 ▼7.40
Add New Post /wp-admin/post-new.php3.20 ▼2.6838.13 ▼52.96
Media Library /wp-admin/upload.php3.29 ▲0.0735.48 ▲4.37
Tube Video Ads /wp-admin/edit.php?post_type=wp_you_link3.3434.28
Go Pro /wp-admin/edit.php?post_type=wp_you_link&page=gopro_wpyoulink3.2630.23
Embeded Code /wp-admin/admin.php?page=embededcode_wpyoulink3.2628.75
Add New /wp-admin/post-new.php?post_type=wp_you_link3.1530.54
How to use /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink3.2642.93

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Tube Video Ads Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7014.67 ▼0.091.80 ▼0.0638.15 ▼5.04
Dashboard /wp-admin2,235 ▲575.65 ▼0.0594.23 ▼18.4442.34 ▼2.34
Posts /wp-admin/edit.php2,134 ▲312.01 ▲0.0740.87 ▼5.5337.43 ▼6.14
Add New Post /wp-admin/post-new.php1,559 ▲3322.98 ▼0.56679.30 ▲35.9558.36 ▲11.25
Media Library /wp-admin/upload.php1,440 ▲404.14 ▼0.0195.71 ▼1.5242.30 ▼1.69
Tube Video Ads /wp-admin/edit.php?post_type=wp_you_link1,1181.9132.5931.74
Go Pro /wp-admin/edit.php?post_type=wp_you_link&page=gopro_wpyoulink8241.9724.5227.85
Embeded Code /wp-admin/admin.php?page=embededcode_wpyoulink8071.9626.0324.96
Add New /wp-admin/post-new.php?post_type=wp_you_link2,2469.20285.25103.04
How to use /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink9372.0027.1433.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=wp_you_link
    • > Notice in wp-content/plugins/tube-video-ads-lite/video.php+82
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=wp_you_link
    • > Notice in wp-content/plugins/tube-video-ads-lite/add_link_html.php+50
    Undefined variable: title

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tube-video-ads-lite/use_wp_you_link.php
    • > /wp-content/plugins/tube-video-ads-lite/link_list_html.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/tube-video-ads-lite/add_link_html.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tube-video-ads-lite/video_free.php:13
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/tube-video-ads-lite/link_list_html.php on line 18
    • > PHP Notice
      Undefined variable: mode in wp-content/plugins/tube-video-ads-lite/preview_video_html.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/tube-video-ads-lite/link_list_html.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tube-video-ads-lite/video.php:13
    • > PHP Notice
      Undefined variable: linkList in wp-content/plugins/tube-video-ads-lite/link_list_html.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tube-video-ads-lite/script.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tube-video-ads-lite/preview_video_html.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=gopro_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/images/youtube_video_ads.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/post-new.php?post_type=wp_you_link
    • > Other (warning) in unknown
    https://www.youtube.com/s/player/31e0b6d9/www-widgetapi.vflset/www-widgetapi.js 1248 Unrecognized feature: 'web-share'.
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/resources/htu_01.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/resources/htu_02.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/resources/htu_03.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/resources/htu_04.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=wp_you_link&page=use_wpyoulink
    • > Network (severe)
    http://www.tubevideoads.com/resources/htu_05.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Tube Video Ads menu within the dashboard), #2 (All the videos created with short codes), #3 (Form to create a new video), #4 (Video showed up within a post or a page), #5 (Button Mouse Over effect)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

tube-video-ads-lite/video.php 85% from 13 tests

"Tube Video Ads Lite" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 412 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tube-video-ads-lite.php" instead of "video.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin883 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP717442758
CSS1140125

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
feature.png112.14KB42.03KB▼ 62.52%