79% oembed-manager

Code Review | oEmbed Manager

WordPress plugin oEmbed Manager scored79%from 54 tests.

About plugin

  • Plugin page: oembed-manager
  • Plugin version: 2.12.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2018
  • Latest release: Oct 25, 2023
  • Number of updates: 47
  • Update frequency: every 40.6 days
  • Top authors: PierreLannoy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /8,615 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.03MB] [CPU: ▼1.78ms] Passed 4 tests

An overview of server-side resources used by oEmbed Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8544.28 ▲5.94
Dashboard /wp-admin4.38 ▲1.0854.41 ▲4.06
Posts /wp-admin/edit.php4.50 ▲1.1457.48 ▲13.39
Add New Post /wp-admin/post-new.php6.99 ▲1.1088.84 ▼30.50
Media Library /wp-admin/upload.php4.31 ▲1.0849.09 ▲16.30
oEmbed /wp-admin/admin.php?page=oemm-tools4.4844.76
Tools /wp-admin/admin.php?page=perfopsone-tools4.2840.05
Control Center /wp-admin/admin.php?page=perfopsone-dashboard4.3241.99
oEmbed Manager /wp-admin/admin.php?page=oemm-settings4.3845.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for oEmbed Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲9214.39 ▲0.161.96 ▲0.0739.18 ▼4.64
Dashboard /wp-admin2,262 ▲825.65 ▼0.0291.27 ▲5.2138.64 ▲0.08
Posts /wp-admin/edit.php2,168 ▲682.02 ▲0.0539.29 ▲4.1535.38 ▼0.32
Add New Post /wp-admin/post-new.php1,564 ▲3823.28 ▲0.35656.06 ▼63.5559.40 ▼2.85
Media Library /wp-admin/upload.php1,458 ▲584.27 ▼0.03105.87 ▼7.2745.90 ▼1.48
oEmbed /wp-admin/admin.php?page=oemm-tools1,1082.0429.6740.56
Tools /wp-admin/admin.php?page=perfopsone-tools8882.0023.9227.71
Control Center /wp-admin/admin.php?page=perfopsone-dashboard1,0812.0124.6733.69
oEmbed Manager /wp-admin/admin.php?page=oemm-settings9682.0424.6532.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/oembed-manager/public/partials/oembed-manager-public-display.php
  • 41× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/oembed-manager/admin/partials/oembed-manager-admin-settings-options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oembed-manager/perfopsone/functions.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/oembed-manager/admin/partials/oembed-manager-admin-settings-consumer.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Oemm\\Plugin\\Feature\\add_shortcode() in wp-content/plugins/oembed-manager/includes/features/class-wpcli.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/oembed-manager/includes/libraries/psr/http-client/NetworkExceptionInterface.php:14
    • > 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-manager/includes/features/class-posts.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/oembed-manager/admin/partials/oembed-manager-admin-settings-producer.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Oemm\\Plugin\\Feature\\Integration' not found in wp-content/plugins/oembed-manager/includes/features/class-dnt.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/oembed-manager/includes/features/class-posts.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/oembed-manager/admin/partials/oembed-manager-admin-settings-about.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: privacy, manager, gdpr, oembed, embed

oembed-manager/oembed-manager.php Passed 13 tests

"oEmbed Manager" version 2.12.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
111 characters long description:
Manage oEmbed capabilities of your website and take a new step in the GDPR compliance of your embedded content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected13,432 lines of code in 418 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141,1746,5878,086
SVG286014,252
CSS51191745
Markdown71300274
JSON20053
JavaScript41022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces14
Interfaces13
Traits15
Classes68
▷ Abstract classes34.41%
▷ Concrete classes6595.59%
▷ Final classes00.00%
Methods619
▷ Static methods21634.89%
▷ Public methods45573.51%
▷ Protected methods10917.61%
▷ Private methods558.89%
Functions17
▷ Named functions635.29%
▷ Anonymous functions1164.71%
Constants54
▷ Global constants4379.63%
▷ Class constants1120.37%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/medias/uk-cookie-consent-icon-128x128.png13.22KB5.32KB▼ 59.74%
admin/medias/do-not-track-stats-icon-128x128.png16.06KB6.08KB▼ 62.16%
admin/medias/cookie-notice-icon-128x128.png3.69KB2.73KB▼ 25.91%
admin/medias/gdpr-cookie-compliance-icon-128x128.png28.17KB6.12KB▼ 78.27%
admin/medias/cookie-law-info-icon-128x128.png7.00KB3.01KB▼ 56.96%