99% lightweight-and-responsive-youtube-embed

Code Review | Lightweight and Responsive Youtube Embed

WordPress plugin Lightweight and Responsive Youtube Embed scored 99% from 54 tests.

About plugin

  • Plugin page: lightweight-and-r...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 9, 2017
  • Latest release: Aug 27, 2018
  • Number of updates: 12
  • Update frequency: every 26.8 days
  • Top authors: wpszaki (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 882 total downloads

Benchmarks

Plugin footprint Passed 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.05MB] [CPU: ▼136.87ms] Passed 4 tests

This is a short check of server-side resources used by Lightweight and Responsive Youtube Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.0418.73 ▼12.16
Dashboard /wp-admin3.15 ▲0.0949.58 ▲8.01
Posts /wp-admin/edit.php3.26 ▲0.1450.30 ▼2.76
Add New Post /wp-admin/post-new.php5.50 ▲0.07106.69 ▼536.76
Media Library /wp-admin/upload.php3.09 ▲0.0933.79 ▲4.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Lightweight and Responsive Youtube Embed: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,829 ▲19216.16 ▲0.7413.67 ▲2.5448.37 ▼1.60
Dashboard /wp-admin2,974 ▲435.86 ▼0.12129.63 ▼14.89135.77 ▲28.04
Posts /wp-admin/edit.php2,771 ▲322.68 ▼0.0178.93 ▲11.12110.67 ▲12.97
Add New Post /wp-admin/post-new.php1,510 ▲1018.58 ▼0.19413.72 ▲56.21109.73 ▼5.07
Media Library /wp-admin/upload.php1,768 ▼425.00 ▼0.01127.73 ▼27.42143.09 ▲22.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: youtube, embed, video, lightweight, responsive...

lightweight-and-responsive-youtube-embed/lightweight-and-responsive-youtube-embed.php 85% from 13 tests

The main PHP file in "Lightweight and Responsive Youtube Embed" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 234 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected355 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10160483350
JavaScript22274
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/youtube-icon.png0.43KB0.43KB0.00%
images/video.png1.66KB1.60KB▼ 3.59%