89% wonderplugin-video-embed

Code Review | Wonder Video Embed

WordPress plugin Wonder Video Embed scored89%from 54 tests.

About plugin

  • Plugin page: wonderplugin-vide...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2018
  • Latest release: Oct 28, 2022
  • Number of updates: 18
  • Update frequency: every 94.3 days
  • Top authors: wonderplugin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

7,000+ active /77,482 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼1.13ms] 75% from 4 tests

Server-side resources used by Wonder Video Embed
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,009.90ms on /wp-admin/admin.php?page=wonderplugin_videoembed_overview)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2136.59 ▼4.75
Dashboard /wp-admin3.61 ▲0.3151.98 ▲4.45
Posts /wp-admin/edit.php3.66 ▲0.3156.47 ▲9.76
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.02 ▼13.99
Media Library /wp-admin/upload.php3.45 ▲0.2243.04 ▲11.37
Overview /wp-admin/admin.php?page=wonderplugin_videoembed_overview4.561,009.90
Quick Start /wp-admin/admin.php?page=wonderplugin_videoembed_show_quick_start3.4436.01
Settings /wp-admin/admin.php?page=wonderplugin_videoembed_edit_settings3.4531.84

Server storage [IO: ▲0.47MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_wonderplugin_videoembed_widget
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Wonder Video 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,073 ▲30215.38 ▲0.995.64 ▲3.8040.39 ▼4.44
Dashboard /wp-admin2,377 ▲1926.73 ▲1.86129.93 ▲21.78132.93 ▲86.48
Posts /wp-admin/edit.php2,295 ▲2093.60 ▲1.5955.38 ▲14.1885.84 ▲49.33
Add New Post /wp-admin/post-new.php1,711 ▲18122.90 ▲4.85652.92 ▲40.9537.48 ▼11.91
Media Library /wp-admin/upload.php1,437 ▲494.38 ▲0.1380.26 ▼18.9187.98 ▲45.07
Overview /wp-admin/admin.php?page=wonderplugin_videoembed_overview1,2403.9656.9783.60
Quick Start /wp-admin/admin.php?page=wonderplugin_videoembed_show_quick_start1,5183.7049.7585.87
Settings /wp-admin/admin.php?page=wonderplugin_videoembed_edit_settings1,1033.7049.2376.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_wonderplugin_videoembed_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can look at the official readme.txt

wonderplugin-video-embed/wonderpluginvideoembed.php 92% from 13 tests

The principal PHP file in "Wonder Video Embed" v. 1.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wonderplugin-video-embed.php" instead of "wonderpluginvideoembed.php")

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
Everything looks great! No dangerous files found in this plugin1,453 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6372131,268
CSS2300120
JavaScript301565

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.67
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods84
▷ Static methods00.00%
▷ Public methods84100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.38MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-16.png0.32KB0.29KB▼ 9.04%
images/wordpress-add-youtube.png39.40KB11.77KB▼ 70.12%
images/logo-32.png0.47KB0.44KB▼ 6.65%
engine/playvideo-64-64-2.png0.73KB0.50KB▼ 32.04%
images/wordpress-post-video.png25.46KB7.60KB▼ 70.14%