78% mihdan-lite-youtube-embed

Code Review | Lite Video Embed

WordPress plugin Lite Video Embed scored78%from 54 tests.

About plugin

  • Plugin page: mihdan-lite-youtu...
  • Plugin version: 1.7.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 39
  • Update frequency: every 32.2 days
  • Top authors: mihdan (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /12,168 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.40MB] [CPU: ▲0.45ms] 75% from 4 tests

A check of server-side resources used by Lite Video Embed
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 692.02ms on /wp-admin/options-general.php?page=mihdan-lite-youtube-embed)
PageMemory (MB)CPU Time (ms)
Home /4.82 ▲1.3644.17 ▲7.17
Dashboard /wp-admin4.79 ▲1.4456.87 ▼6.34
Posts /wp-admin/edit.php4.84 ▲1.4862.96 ▲11.50
Add New Post /wp-admin/post-new.php7.30 ▲1.4192.41 ▼9.65
Media Library /wp-admin/upload.php4.62 ▲1.3945.62 ▲10.61
Lite Video Embed /wp-admin/options-general.php?page=mihdan-lite-youtube-embed5.22692.02

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,467 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
mlye_plugins
mlye_general
mlye_tools
mlye_contacts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lite Video Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22814.77 ▲0.431.79 ▲0.1237.90 ▼0.38
Dashboard /wp-admin2,351 ▲1706.32 ▲0.61120.22 ▲11.0140.33 ▼0.23
Posts /wp-admin/edit.php2,297 ▲1943.58 ▲1.6157.79 ▲15.3332.94 ▼2.91
Add New Post /wp-admin/post-new.php1,553 ▲2723.94 ▲0.24595.42 ▼117.7532.93 ▼30.11
Media Library /wp-admin/upload.php1,437 ▲434.45 ▲0.2682.97 ▼16.7840.62 ▼3.35
Lite Video Embed /wp-admin/options-general.php?page=mihdan-lite-youtube-embed3,7923.6157.11113.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • mlye_tools
    • widget_recent-comments
    • db_upgraded
    • mlye_contacts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • mlye_plugins
    • mlye_general

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mihdan-lite-youtube-embed/vendor/antecedent/patchwork/src/Console.php
    • > /wp-content/plugins/mihdan-lite-youtube-embed/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 805× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SebastianBergmann\\CodeUnit\\CodeUnit' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/sebastian/code-unit/src/ClassUnit.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\Exception' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php:15
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/latte/latte/src/Latte/Runtime/FilterInfo.php on line 18
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Runner\\TestHook' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\Cast' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'SebastianBergmann\\ObjectReflector\\Exception' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/sebastian/object-reflector/src/InvalidArgumentException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Exception' not found in wp-content/plugins/mihdan-lite-youtube-embed/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can look at the official readme.txt

mihdan-lite-youtube-embed/mihdan-lite-youtube-embed.php Passed 13 tests

The main file in "Lite Video Embed" v. 1.7.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
A faster YouTube/RuTube embed. Renders faster than a sneeze.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin96,158 lines of code in 1,369 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,25519,43234,63387,393
JSON4002,373
yacc3336122,050
Markdown321,05301,598
reStructuredText381,0521,3411,250
XSD300964
JavaScript92118166
XML1211156
CSS6328135
Python17015542
YAML40029
SVG2002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 142)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.02
▷ Minimum class complexity1.00
▷ Maximum class complexity225.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity142.00
Code structure
Namespaces158
Interfaces102
Traits11
Classes1,141
▷ Abstract classes665.78%
▷ Concrete classes1,07594.22%
▷ Final classes44641.49%
Methods6,568
▷ Static methods96214.65%
▷ Public methods5,24679.87%
▷ Protected methods68910.49%
▷ Private methods6339.64%
Functions1,920
▷ Named functions51927.03%
▷ Anonymous functions1,40172.97%
Constants635
▷ Global constants253.94%
▷ Class constants61096.06%
▷ Public constants55791.31%

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