84% better-oembed-video

Code Review | Better oEmbed Video

WordPress plugin Better oEmbed Video scored84%from 54 tests.

About plugin

  • Plugin page: better-oembed-video
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: Aug 17, 2016
  • Number of updates: 17
  • Update frequency: every 80.6 days
  • Top authors: taunoh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,033 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.23ms] Passed 4 tests

This is a short check of server-side resources used by Better oEmbed Video
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.12 ▼6.03
Dashboard /wp-admin3.33 ▲0.0246.81 ▼3.94
Posts /wp-admin/edit.php3.38 ▲0.0249.24 ▼2.28
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.04 ▼20.65
Media Library /wp-admin/upload.php3.25 ▲0.0237.57 ▲2.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Better oEmbed Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.80 ▼0.579.25 ▲7.4841.80 ▼2.21
Dashboard /wp-admin2,195 ▲155.62 ▲0.0899.15 ▲12.9041.28 ▲1.55
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0539.48 ▼0.8532.15 ▼7.33
Add New Post /wp-admin/post-new.php1,526 ▼1123.21 ▲4.95669.85 ▲39.8856.53 ▼19.05
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.0596.02 ▼1.7341.15 ▼3.84

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

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

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/better-oembed-video/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: oembed, embed, responsive, video

better-oembed-video/index.php 85% from 13 tests

The entry point to "Better oEmbed Video" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("better-oembed-video.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

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 plugin325 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP13055111
JavaScript215874
Sass110268
CSS10056
JSON10010
SVG1016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
gfx/icon-play.png0.69KB0.37KB▼ 46.58%