84% better-core-video-embeds

Code Review | Better Core Video Embeds

WordPress plugin Better Core Video Embeds scored84%from 54 tests.

About plugin

  • Plugin page: better-core-video...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2022
  • Latest release: Jan 21, 2023
  • Number of updates: 9
  • Update frequency: every 9.9 days
  • Top authors: highrisedigital (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,050 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Better Core Video Embeds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.24 ▲2.98
Dashboard /wp-admin3.35 ▲0.0050.47 ▼21.56
Posts /wp-admin/edit.php3.40 ▲0.0454.92 ▲2.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.74 ▼8.16
Media Library /wp-admin/upload.php3.27 ▲0.0438.24 ▲2.77

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Better Core Video Embeds
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.25 ▼0.281.87 ▼0.7542.70 ▼0.91
Dashboard /wp-admin2,198 ▲215.62 ▼0.1193.22 ▼8.7942.27 ▼0.87
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.1139.19 ▼4.1235.51 ▼1.50
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▲0.14697.64 ▲17.3255.61 ▲3.31
Media Library /wp-admin/upload.php1,397 ▼64.21 ▼0.02101.40 ▼9.4543.56 ▼1.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/better-core-video-embeds/better-core-video-embeds.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: embed, oembed, vimeo, blocks, youtube...

better-core-video-embeds/better-core-video-embeds.php Passed 13 tests

This is the main PHP file of "Better Core Video Embeds" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
132 characters long description:
A plugin which enhances the core video embeds for Youtube and Vimeo videos by not loading unnecessary scripts until they are needed.

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 plugin302 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121180235
CSS20039
JavaScript2212528

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.39
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%
Functions13
▷ Named functions13100.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
PNG images were not found in this plugin