73% youram-youtube-embed

Code Review | YouTube Embed - YouTube Gallery, Vimeo Gallery - Wordpress Plugin

WordPress plugin YouTube Embed - YouTube Gallery, Vimeo Gallery - Wordpress Plugin scored73%from 54 tests.

About plugin

  • Plugin page: youram-youtube-embed
  • Plugin version: 10.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Mar 22, 2023
  • Number of updates: 127
  • Update frequency: every 7.5 days
  • Top authors: hanucodes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,796 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.71MB] [CPU: ▲23.66ms] 75% from 4 tests

Server-side resources used by YouTube Embed - YouTube Gallery, Vimeo Gallery - Wordpress Plugin
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.71MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.50 ▲6.0474.40 ▲33.00
Dashboard /wp-admin9.52 ▲6.2276.53 ▲25.03
Posts /wp-admin/edit.php9.52 ▲6.1682.11 ▲28.64
Add New Post /wp-admin/post-new.php10.33 ▲4.43107.09 ▲7.98
Media Library /wp-admin/upload.php9.52 ▲6.2973.49 ▲39.13
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.5261.50

Server storage [IO: ▲3.97MB] [DB: ▲0.06MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 195 new files
Database: no new tables, 25 new options
New WordPress options
widget_recent-comments
fs_active_plugins
theysaidso_admin_options
widget_recent-posts
youram_gallery-with-tabs
youram_single-video
youram_gallery-list-view
youram_gallery-tabs-cards
youram_gallery-popup
youram_single-video-subscribe
...

Browser metrics Passed 4 tests

An overview of browser requirements for YouTube Embed - YouTube Gallery, Vimeo Gallery - Wordpress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲17313.68 ▼0.5510.86 ▲9.0572.66 ▲29.29
Dashboard /wp-admin2,228 ▲515.59 ▼0.0481.74 ▼24.3543.34 ▼17.26
Posts /wp-admin/edit.php2,134 ▲341.98 ▲0.0140.65 ▲2.4240.14 ▲5.68
Add New Post /wp-admin/post-new.php6,185 ▲4,65719.67 ▼3.60899.40 ▲196.8580.79 ▲20.90
Media Library /wp-admin/upload.php1,433 ▲334.17 ▼0.00102.80 ▼0.3448.11 ▲1.38
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0981.6824.8730.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/youram-youtube-embed/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 25 options in the database
    • fs_active_plugins
    • can_compress_scripts
    • youram_gallery-only-images
    • youram_gallery-popup
    • widget_recent-comments
    • youram_gallery-grid-view
    • youram_current_instance
    • youram_gallery-list-view
    • youram_single-video-color
    • youram_gallery-4columns
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/youram-youtube-embed/admin/youram-options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #20, #21, #22 in youram-youtube-embed/assets to your readme.txt
Please take inspiration from this readme.txt

youram-youtube-embed/youram-wordpress.php 92% from 13 tests

This is the main PHP file of "YouTube Embed - YouTube Gallery, Vimeo Gallery - Wordpress Plugin" version 10.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("youram-youtube-embed.php" instead of "youram-wordpress.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected35,614 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1218,27417,50135,291
JavaScript65589261
CSS17112053
JSON1009

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity94.14
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,294
▷ Static methods19214.84%
▷ Public methods89869.40%
▷ Protected methods312.40%
▷ Private methods36528.21%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/youram-youtube-embed.png14.81KB6.37KB▼ 57.03%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%