10% oembed-in-library

Code Review | OEmbed in Library

WordPress plugin OEmbed in Library scored 10% from 54 tests.

About plugin

  • Plugin page: oembed-in-library
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 5.8.1
  • First release: Jul 29, 2013
  • Latest release: Nov 5, 2013
  • Number of updates: 9
  • Update frequency: every 11.2 days
  • Top authors: cyrilbatillat (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,940 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5401
    class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead.

Server metrics [RAM: ▼1.82MB] [CPU: ▼187.04ms] Passed 4 tests

Server-side resources used by OEmbed in Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.915.03 ▼14.65
Dashboard /wp-admin1.82 ▼1.234.99 ▼33.17
Posts /wp-admin/edit.php1.83 ▼1.287.15 ▼42.97
Add New Post /wp-admin/post-new.php1.82 ▼3.615.74 ▼645.29
Media Library /wp-admin/upload.php1.83 ▼1.185.21 ▼26.72
oEmbed /wp-admin/upload.php?page=oembedinlibrary1.835.46

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for OEmbed in Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.84 ▲0.4411.09 ▲2.6247.13 ▼2.58
Dashboard /wp-admin2,975 ▲446.10 ▲0.10137.05 ▼10.98108.04 ▲1.57
Posts /wp-admin/edit.php2,741 ▲22.69 ▼0.0164.86 ▲2.6990.75 ▲9.90
Add New Post /wp-admin/post-new.php1,503 ▼18018.45 ▼0.13349.73 ▼20.49108.90 ▼3.01
Media Library /wp-admin/upload.php1,812 ▲25.01 ▲0.01152.54 ▲1.21117.96 ▲1.27
oEmbed /wp-admin/upload.php?page=oembedinlibrary1,0562.3456.8069.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5401
    class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/upload.php?page=oembedinlibrary
    • > User deprecated in wp-includes/functions.php+5401
    class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead.

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHWPINC/class-oembed.php): failed to open stream: No such file or directory in wp-content/plugins/oembed-in-library/index.php on line 31
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/oembed-in-library/index.php on line 31
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/oembed-in-library/index.php on line 31
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-oembed.php' (include_path='.:/usr/share/php') in wp-content/plugins/oembed-in-library/index.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

oembed-in-library/index.php 92% from 13 tests

The primary PHP file in "OEmbed in Library" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("oembed-in-library.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin212 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13974156
PO File1111336
JavaScript11318
CSS1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mime_icons/oembed_SoundCloud.png2.26KB2.20KB▼ 2.72%
mime_icons/oembed_Spotify.png3.37KB2.56KB▼ 23.99%
mime_icons/oembed_Flickr.png2.98KB2.44KB▼ 18.08%
mime_icons/oembed_Vimeo.png3.73KB2.62KB▼ 29.93%
mime_icons/oembed_Twitter.png2.32KB2.12KB▼ 8.75%