10% oembed-as-media

Code Review | oEmbed as media

WordPress plugin oEmbed as media scored10%from 54 tests.

About plugin

  • Plugin page: oembed-as-media
  • Plugin version: $version$...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: Dec 31, 2014
  • Number of updates: 3
  • Update frequency: every 89.0 days
  • Top authors: dgmike (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,063 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5643
    File class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead.

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.94ms] Passed 4 tests

This is a short check of server-side resources used by oEmbed as media
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.17 ▼39.31
Dashboard /wp-admin2.06 ▼1.285.39 ▼58.02
Posts /wp-admin/edit.php2.06 ▼1.296.91 ▼42.11
Add New Post /wp-admin/post-new.php2.06 ▼3.836.10 ▼96.32
Media Library /wp-admin/upload.php2.06 ▼1.175.67 ▼28.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for oEmbed as media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.34 ▼0.141.89 ▼0.1142.12 ▼5.16
Dashboard /wp-admin2,195 ▲155.56 ▼0.0980.47 ▼17.6538.36 ▼3.24
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.2139.60 ▲3.6434.01 ▼0.19
Add New Post /wp-admin/post-new.php1,535 ▲918.14 ▼5.19601.75 ▼84.0882.40 ▲32.83
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0394.33 ▼11.5541.02 ▼4.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5643
    File class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > 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-as-media/oembed-as-media.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/oembed-as-media/admin/media-tab.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-oembed.php' (include_path='.:/usr/share/php') in wp-content/plugins/oembed-as-media/oembed-as-media.php on line 14
    • > PHP Notice
      Undefined variable: nonce in wp-content/plugins/oembed-as-media/admin/media-tab.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oembed-as-media/admin/media-upload.php:13
    • > 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-as-media/oembed-as-media.php on line 14
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/oembed-as-media/admin/media-tab.php on line 3
    • > PHP Warning
      require_once(ABSPATHWPINC/class-oembed.php): failed to open stream: No such file or directory in wp-content/plugins/oembed-as-media/oembed-as-media.php on line 14
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/oembed-as-media/admin/media-tab.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: media, youtube, library, oembed

oembed-as-media/oembed-as-media.php 85% from 13 tests

Analyzing the main PHP file in "oEmbed as media" version $version$...
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "$version$...")

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
Good job! No executable or dangerous file extensions detected148 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41222148

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin