83% video-embed-optimizer

Code Review | Video Embed Optimizer

WordPress plugin Video Embed Optimizer scored83%from 54 tests.

About plugin

  • Plugin page: video-embed-optim...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 6.3.1
  • First release: Aug 31, 2016
  • Latest release: Sep 1, 2016
  • Number of updates: 25
  • Update frequency: every 0.1 days
  • Top authors: fdfranklin06 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Video Embed Optimizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.14 ▼2.66
Dashboard /wp-admin3.31 ▲0.0150.09 ▼5.61
Posts /wp-admin/edit.php3.36 ▲0.0049.63 ▼0.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.54 ▼17.63
Media Library /wp-admin/upload.php3.23 ▲0.0139.67 ▲2.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Video Embed Optimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.66 ▼0.022.12 ▲0.4644.44 ▲2.05
Dashboard /wp-admin2,197 ▲175.54 ▼0.1188.23 ▼2.6640.85 ▼1.66
Posts /wp-admin/edit.php2,105 ▲52.02 ▼0.0134.68 ▼5.4233.21 ▼1.24
Add New Post /wp-admin/post-new.php1,530 ▼423.34 ▲0.21684.54 ▲63.6558.98 ▲9.07
Media Library /wp-admin/upload.php1,407 ▲134.24 ▲0.00103.67 ▼2.5044.69 ▼0.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/video-embed-optimizer/veo.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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:
  • Donate link: Please fix this invalid url: "www.eric-franklin.media"
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (A new button is added to the WordPress editor. Click the button to open a window to drop your YouTube or Vimeo URL.), #2 (In the modal window, drop your YouTube or Vimeo URL and press Submit.), #3 (After pressing submit, the shortcode will be generated.), #4 (Side by side comparison of the default YouTube embed vs Video Embed Optimizer plugin.)
The official readme.txt might help

video-embed-optimizer/veo.php 92% from 13 tests

The main file in "Video Embed Optimizer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("video-embed-optimizer.php" instead of "veo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin126 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4201377
PHP1171747
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 1.30MB with 0.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png19.68KB11.96KB▼ 39.20%
screenshot-1.png17.40KB10.49KB▼ 39.74%
screenshot-5.png109.58KB33.20KB▼ 69.70%
screenshot-2.png26.97KB15.27KB▼ 43.39%
screenshot-4.png1,155.06KB290.71KB▼ 74.83%