89% advanced-embed-for-youtube

Code Review | Advanced Embed For YouTube

WordPress plugin Advanced Embed For YouTube scored 89% from 54 tests.

About plugin

  • Plugin page: advanced-embed-fo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: Apr 20, 2021
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: kashberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 498 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼7.17ms] Passed 4 tests

Analyzing server-side resources used by Advanced Embed For YouTube
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.69 ▼11.14
Dashboard /wp-admin3.31 ▲0.0145.44 ▲2.89
Posts /wp-admin/edit.php3.36 ▲0.0147.06 ▼1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.10 ▼18.58
Media Library /wp-admin/upload.php3.24 ▲0.0134.12 ▲2.08

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Embed For YouTube
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.011.70 ▼0.8642.64 ▼1.52
Dashboard /wp-admin2,206 ▲184.85 ▼0.97104.73 ▲8.0040.94 ▲0.73
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.13 ▼2.3634.48 ▼2.13
Add New Post /wp-admin/post-new.php6,419 ▲4,87721.19 ▲2.74972.24 ▲325.9038.47 ▼8.07
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0195.79 ▼9.8540.41 ▼1.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

advanced-embed-for-youtube/wp-embed-youtube.php 69% from 13 tests

The entry point to "Advanced Embed For YouTube" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 197 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-embed-for-youtube.php" instead of "wp-embed-youtube.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin39 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1123337
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin