78% broken-link-checker-for-youtube

Code Review | Broken Link Checker for YouTube

WordPress plugin Broken Link Checker for YouTube scored78%from 54 tests.

About plugin

  • Plugin page: broken-link-check...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: May 16, 2023
  • Number of updates: 31
  • Update frequency: every 88.7 days
  • Top authors: johnh10 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /11,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Broken Link Checker for YouTube
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.0944.97 ▼2.63
Dashboard /wp-admin3.72 ▲0.0854.49 ▼10.65
Posts /wp-admin/edit.php3.77 ▲0.0949.06 ▼5.02
Add New Post /wp-admin/post-new.php6.24 ▲0.0987.36 ▼26.38
Media Library /wp-admin/upload.php3.58 ▲0.0944.35 ▼0.04
YouTube Checker /wp-admin/tools.php?page=youtube_link_checker3.5436.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
ytlc_logfile
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Broken Link Checker for YouTube
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.38 ▼0.001.70 ▼0.4643.31 ▼0.39
Dashboard /wp-admin2,202 ▲225.64 ▲0.0388.38 ▼6.3637.77 ▼4.92
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0336.08 ▲0.1232.49 ▼1.47
Add New Post /wp-admin/post-new.php1,535 ▲423.31 ▲0.18686.83 ▲4.7365.96 ▲4.01
Media Library /wp-admin/upload.php1,404 ▲74.14 ▲0.01109.96 ▼14.7343.98 ▼4.66
YouTube Checker /wp-admin/tools.php?page=youtube_link_checker8252.0125.1828.38

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • ytlc_logfile
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/broken-link-checker-for-youtube/youtube-link-checker.php
    • > /wp-content/plugins/broken-link-checker-for-youtube/youtube-link-functions.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/broken-link-checker-for-youtube/templates/settings.php:3

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 96% from 29 tests

readme.txt Passed 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
6 plugin tags: youtube, link checker, broken links, embed video, video...

broken-link-checker-for-youtube/youtube-link-checker.php 92% from 13 tests

This is the main PHP file of "Broken Link Checker for YouTube" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("broken-link-checker-for-youtube.php" instead of "youtube-link-checker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin521 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3120133521

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity35.50
▷ Minimum class complexity3.00
▷ Maximum class complexity68.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1043.48%
▷ Protected methods28.70%
▷ Private methods1147.83%
Functions0
▷ Named functions00.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/yt_logo_rgb_light.png19.98KB8.66KB▼ 56.67%