83% fast-and-responsive-youtube-vimeo-embed

Code Review | Fast and Responsive Youtube Vimeo Embed

WordPress plugin Fast and Responsive Youtube Vimeo Embed scored83%from 54 tests.

About plugin

  • Plugin page: fast-and-responsi...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Jul 10, 2021
  • Number of updates: 6
  • Update frequency: every 27.7 days
  • Top authors: yeelloo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.85ms] Passed 4 tests

An overview of server-side resources used by Fast and Responsive Youtube Vimeo Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.96 ▼1.34
Dashboard /wp-admin3.34 ▲0.0345.25 ▼7.68
Posts /wp-admin/edit.php3.39 ▲0.0345.12 ▼2.30
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.98 ▼16.07
Media Library /wp-admin/upload.php3.26 ▲0.0335.81 ▲0.61
YTVF Embed /wp-admin/admin.php?page=ytvf-embed3.2330.03

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Fast and Responsive Youtube Vimeo Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.19 ▼1.221.90 ▲0.1944.19 ▲3.94
Dashboard /wp-admin2,218 ▲304.87 ▼0.99102.16 ▼3.9238.34 ▼3.40
Posts /wp-admin/edit.php2,098 ▲91.99 ▼0.0135.43 ▼0.5333.51 ▲1.39
Add New Post /wp-admin/post-new.php1,543 ▲2423.37 ▲0.32657.41 ▼37.8258.17 ▼2.94
Media Library /wp-admin/upload.php1,403 ▲124.21 ▼0.06108.90 ▲5.4747.50 ▼3.38
YTVF Embed /wp-admin/admin.php?page=ytvf-embed8661.7428.7325.69

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fast-and-responsive-youtube-vimeo-embed/ytvf.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Please take inspiration from this readme.txt

fast-and-responsive-youtube-vimeo-embed/ytvf.php 92% from 13 tests

"Fast and Responsive Youtube Vimeo Embed" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("fast-and-responsive-youtube-vimeo-embed.php" instead of "ytvf.php")

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
Everything looks great! No dangerous files found in this plugin326 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12316326

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin