10% youtube-comments

Code Review | YouTube Comments

WordPress plugin YouTube Comments scored10%from 54 tests.

About plugin

  • Plugin page: youtube-comments
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2013
  • Latest release: Nov 14, 2013
  • Number of updates: 10
  • Update frequency: every 12.0 days
  • Top authors: sydcode (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /4,909 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/youtube-comments/google-api-php-client/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.68MB] [CPU: ▼51.20ms] Passed 4 tests

A check of server-side resources used by YouTube Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.155.89 ▼30.13
Dashboard /wp-admin2.33 ▼0.988.63 ▼40.22
Posts /wp-admin/edit.php2.33 ▼1.038.10 ▼38.50
Add New Post /wp-admin/post-new.php2.33 ▼3.568.00 ▼95.95
Media Library /wp-admin/upload.php2.33 ▼0.908.46 ▼26.02
YouTube Comments /wp-admin/options-general.php?page=youtube-comments2.337.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for YouTube Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.14 ▼1.254.76 ▲2.8141.27 ▲0.32
Dashboard /wp-admin2,213 ▲285.86 ▼0.0497.63 ▼11.3242.59 ▼0.77
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0539.89 ▼1.8838.23 ▲2.57
Add New Post /wp-admin/post-new.php1,530 ▲1622.23 ▲4.73643.28 ▼41.2065.41 ▲6.60
Media Library /wp-admin/upload.php1,395 ▲44.15 ▼0.08100.80 ▼8.1548.55 ▲0.48
YouTube Comments /wp-admin/options-general.php?page=youtube-comments8842.0725.1428.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/youtube-comments/google-api-php-client/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=youtube-comments
    • > Deprecated in wp-content/plugins/youtube-comments/google-api-php-client/src/service/Google_Utils.php+58
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/options-general.php?page=youtube-comments
    • > Deprecated in wp-content/plugins/youtube-comments/class-comments.php+331
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/youtube-comments/template-comments.php
  • 63× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_BigqueryService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_LatitudeService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_FusiontablesService.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_PlusService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Cache' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/cache/Google_FileCache.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_AuditService.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_MirrorService.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/youtube-comments/google-api-php-client/src/contrib/Google_WebfontsService.php:25
    • > PHP Notice
      Undefined variable: start_index in wp-content/plugins/youtube-comments/template-comments.php on line 91
    • > PHP Warning
      require_once(io/Google_HttpRequest.php): failed to open stream: No such file or directory in wp-content/plugins/youtube-comments/google-api-php-client/src/io/Google_IO.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

youtube-comments/youtube-comments.php Passed 13 tests

Analyzing the main PHP file in "YouTube Comments" version 1.2.1
79 characters long description:
This plugin finds YouTube links in post content and imports the video comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin41,819 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP742,05210,53041,622
CSS1303137
JavaScript110960

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.88
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes1,071
▷ Abstract classes40.37%
▷ Concrete classes1,06799.63%
▷ Final classes00.00%
Methods9,048
▷ Static methods200.22%
▷ Public methods9,02199.70%
▷ Protected methods40.04%
▷ Private methods230.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants00.00%
▷ Class constants16100.00%
▷ Public constants16100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
profile.png0.90KB0.62KB▼ 31.97%