83% lite-embed-for-youtube

Code Review | Lite YouTube Embed

WordPress plugin Lite YouTube Embed scored83%from 54 tests.

About plugin

  • Plugin page: lite-embed-for-yo...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: May 18, 2023
  • Number of updates: 9
  • Update frequency: every 139.6 days
  • Top authors: seezer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.58ms] Passed 4 tests

Analyzing server-side resources used by Lite YouTube Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.71 ▼2.42
Dashboard /wp-admin3.31 ▲0.0153.21 ▼4.64
Posts /wp-admin/edit.php3.36 ▲0.0052.00 ▼0.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.91 ▼19.06
Media Library /wp-admin/upload.php3.23 ▲0.0034.89 ▼4.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Lite YouTube Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.25 ▼0.392.19 ▲0.1444.34 ▼4.79
Dashboard /wp-admin2,201 ▲245.59 ▼0.0684.59 ▼20.9941.70 ▼2.04
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0334.68 ▼0.3932.70 ▼3.29
Add New Post /wp-admin/post-new.php1,530 ▲223.24 ▼0.02600.08 ▼76.8555.67 ▲2.92
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.04104.61 ▼12.7443.92 ▼4.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lite-embed-for-youtube/lite-yt-embed.php:38

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === lite-embed-for-youtube === )
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

lite-embed-for-youtube/lite-yt-embed.php 85% from 13 tests

The primary PHP file in "Lite YouTube Embed" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lite-embed-for-youtube.php" instead of "lite-yt-embed.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 315 characters long)

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
Good job! No executable or dangerous file extensions detected200 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1225193
CSS16773
PHP112034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected