78% wp-youtube-lyte

Code Review | WP YouTube Lyte

WordPress plugin WP YouTube Lyte scored78%from 54 tests.

About plugin

  • Plugin page: wp-youtube-lyte
  • Plugin version: 1.7.22
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 22, 2010
  • Latest release: Aug 10, 2023
  • Number of updates: 195
  • Update frequency: every 24.8 days
  • Top authors: futtta (100%)

Code review

54 tests

User reviews

192 reviews

Install metrics

30,000+ active /788,479 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▲0.66ms] 75% from 4 tests

An overview of server-side resources used by WP YouTube Lyte
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,530.55ms on /wp-admin/options-general.php?page=lyte_settings_page)
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.05 ▲1.74
Dashboard /wp-admin3.59 ▲0.2948.06 ▲0.86
Posts /wp-admin/edit.php3.70 ▲0.3549.87 ▲6.01
Add New Post /wp-admin/post-new.php6.17 ▲0.2991.88 ▼5.36
Media Library /wp-admin/upload.php3.51 ▲0.2939.12 ▲5.41
WP YouTube Lyte /wp-admin/options-general.php?page=lyte_settings_page5.341,530.55
Lyte partner /wp-admin/admin.php?page=lyte_partners4.60449.98

Server storage [IO: ▲0.34MB] [DB: ▲0.17MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • There were 3 files (0.52KB) illegally modified outside of "wp-content/plugins/wp-youtube-lyte/" and "wp-content/uploads/"
    • (new file) wp-content/cache/lyteCache/doubleCheckLyteThumbnailCache.txt
    • (new file) wp-content/cache/lyteCache/index.html
    • (new file) wp-content/cache/lyteCache/disableThumbFallback.txt
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_wylwidget
can_compress_scripts
lyte_version
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP YouTube Lyte
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.65 ▼0.621.62 ▼0.1641.39 ▼4.87
Dashboard /wp-admin2,216 ▲255.91 ▲1.03111.06 ▲5.4338.40 ▼4.20
Posts /wp-admin/edit.php2,101 ▲92.01 ▼0.1640.54 ▼1.2536.07 ▲1.52
Add New Post /wp-admin/post-new.php1,542 ▲2823.40 ▲5.63681.82 ▲34.5158.62 ▼9.27
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.1297.01 ▼1.9846.15 ▲0.70
WP YouTube Lyte /wp-admin/options-general.php?page=lyte_settings_page1,3752.1941.0429.30
Lyte partner /wp-admin/admin.php?page=lyte_partners9312.1830.2631.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.17MB] 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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_wylwidget
    • lyte_version
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-youtube-lyte/lyteCache.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-youtube-lyte/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-youtube-lyte/player_sizes.inc.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: youtube, lazy load, video, gdpr, performance

wp-youtube-lyte/wp-youtube-lyte.php Passed 13 tests

The entry point to "WP YouTube Lyte" version 1.7.22 is a PHP file that has certain tags in its header comment area
54 characters long description:
Lite and accessible YouTube audio and video embedding.

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
Success! There were no dangerous files found in this plugin2,962 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP62242191,608
PO File84265631,087
JavaScript73360243
CSS201321
HTML3003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
external/do_not_donate_smallest.png9.36KB3.91KB▼ 58.24%
lyte/lytesprite_claes.png9.84KB4.40KB▼ 55.22%
lyte/lytesprite_2014.png3.78KB3.01KB▼ 20.53%
lyte/lytesprite.png4.73KB3.55KB▼ 24.80%
screenshot-1.png25.56KB22.67KB▼ 11.29%