58% check-youtube-videos

Code Review | Checker youtube videos

WordPress plugin Checker youtube videos scored58%from 54 tests.

About plugin

  • Plugin page: check-youtube-videos
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: May 20, 2017
  • Number of updates: 6
  • Update frequency: every 3.7 days
  • Top authors: egorpetrov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.84MB] [CPU: ▼37.49ms] Passed 4 tests

This is a short check of server-side resources used by Checker youtube videos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.54 ▼3.60
Dashboard /wp-admin3.12 ▼0.2327.97 ▼41.35
Posts /wp-admin/edit.php3.12 ▼0.2430.18 ▼22.57
Add New Post /wp-admin/post-new.php3.12 ▼2.7726.77 ▼82.44
Media Library /wp-admin/upload.php3.12 ▼0.1134.93 ▼3.07
Youtube checker /wp-admin/admin.php?page=youtube-checker3.1226.15
Available videos0 /wp-admin/admin.php?page=youtube-checker-all-videos3.1228.58
Settings /wp-admin/admin.php?page=youtube-checker-settings3.1224.53
Unavailable videos0 /wp-admin/admin.php?page=youtube-checker-unavailable-videos3.1228.74

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Checker youtube videos
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.28 ▼0.072.62 ▲0.7544.19 ▲0.65
Dashboard /wp-admin2,246 ▲665.59 ▼0.0792.48 ▼4.6542.55 ▲2.55
Posts /wp-admin/edit.php2,151 ▲511.98 ▲0.0141.41 ▲2.9337.06 ▼1.31
Add New Post /wp-admin/post-new.php1,570 ▲4423.80 ▲0.87654.11 ▲9.5952.94 ▲0.07
Media Library /wp-admin/upload.php1,448 ▲454.21 ▲0.0298.68 ▼3.1344.20 ▼2.17
Youtube checker /wp-admin/admin.php?page=youtube-checker8302.0024.4127.23
Available videos0 /wp-admin/admin.php?page=youtube-checker-all-videos8322.0223.9728.20
Settings /wp-admin/admin.php?page=youtube-checker-settings8872.0126.5927.64
Unavailable videos0 /wp-admin/admin.php?page=youtube-checker-unavailable-videos8322.0324.0626.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_youtube_check_history
    • wp_posts_with_videos
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtube-checker-unavailable-videos
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=youtube-checker
    • > Notice in wp-content/plugins/check-youtube-videos/class-pages.php+7
    Undefined index: youtube_checker_action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtube-checker-unavailable-videos
    • > Notice in wp-content/plugins/check-youtube-videos/class-database.php+136
    Undefined index: pagination
    • > GET request to /wp-admin/admin.php?page=youtube-checker-settings
    • > Notice in wp-content/plugins/check-youtube-videos/templates/settings.php+8
    Undefined index: is_wrong_api_key

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\ContentSources\\Content_Source_Abstract' not found in wp-content/plugins/check-youtube-videos/ContentSources/class-woo-commerce.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\templates\\Template' not found in wp-content/plugins/check-youtube-videos/templates/index-page.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\YoutubePlugins\\Youtube_Plugin_Abstract' not found in wp-content/plugins/check-youtube-videos/YoutubePlugins/class-youtube-widget-responsive.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\templates\\Template' not found in wp-content/plugins/check-youtube-videos/templates/unavailable-videos.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\ContentSources\\Content_Source_Abstract' not found in wp-content/plugins/check-youtube-videos/ContentSources/class-post.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\YoutubePlugins\\Youtube_Plugin_Abstract' not found in wp-content/plugins/check-youtube-videos/YoutubePlugins/class-youtube.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/check-youtube-videos/checker-youtube-videos.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\templates\\Template' not found in wp-content/plugins/check-youtube-videos/templates/available-videos.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\Singleton_Abstract' not found in wp-content/plugins/check-youtube-videos/YoutubePlugins/class-youtube-plugin-abstract.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PetrovEgor\\Singleton_Abstract' not found in wp-content/plugins/check-youtube-videos/ContentSources/class-content-source-abstract.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: youtube, broken, links

check-youtube-videos/checker-youtube-videos.php 77% from 13 tests

The entry point to "Checker youtube videos" version 1.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 222 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("check-youtube-videos.php" instead of "checker-youtube-videos.php")

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
There were no executable files found in this plugin1,119 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP221581471,116
Markdown1103

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.19
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes16
▷ Abstract classes318.75%
▷ Concrete classes1381.25%
▷ Final classes00.00%
Methods71
▷ Static methods5070.42%
▷ Public methods6895.77%
▷ Protected methods11.41%
▷ Private methods22.82%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin