78% embedpress

Code Review | EmbedPress - Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & Any Documents in Gutenberg & Elementor

WordPress plugin EmbedPress - Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & Any Documents in Gutenberg & Elementor scored78%from 54 tests.

About plugin

  • Plugin page: embedpress
  • Plugin version: 3.9.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Nov 23, 2023
  • Number of updates: 227
  • Update frequency: every 11.8 days
  • Top authors: pressshack (29.96%)wpdevteam (29.07%)Asif2BD (18.5%)embedpress (11.45%)andergmartins (8.37%)

Code review

54 tests

User reviews

185 reviews

Install metrics

80,000+ active /1,955,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲2.00MB] [CPU: ▲15.61ms] Passed 4 tests

A check of server-side resources used by EmbedPress - Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & Any Documents in Gutenberg & Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.24 ▲1.7751.35 ▲10.86
Dashboard /wp-admin5.36 ▲2.0564.40 ▲11.52
Posts /wp-admin/edit.php5.48 ▲2.1266.71 ▲20.33
Add New Post /wp-admin/post-new.php8.15 ▲2.26115.65 ▲22.17
Media Library /wp-admin/upload.php5.29 ▲2.0554.38 ▲19.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 770 new files
Database: no new tables, 12 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
embedpress:elements
embedpress_v_320_migration
db_upgraded
embedpress_activation_redirect_done
can_compress_scripts
embedpress_elements_updated
widget_recent-comments
embedpress
...

Browser metrics Passed 4 tests

Checking browser requirements for EmbedPress - Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & Any Documents in Gutenberg & Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲27014.00 ▼0.4011.94 ▲10.0640.19 ▲2.75
Dashboard /wp-admin2,294 ▲1175.71 ▲0.0695.18 ▼5.0878.37 ▲32.90
Posts /wp-admin/edit.php2,204 ▲1072.19 ▲0.1238.93 ▲2.2741.90 ▲9.88
Add New Post /wp-admin/post-new.php6,385 ▲4,85921.45 ▼1.64871.67 ▲251.29167.06 ▲106.78
Media Library /wp-admin/upload.php1,501 ▲984.22 ▲0.00102.46 ▲3.8680.96 ▲39.61

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 12 options in the database
    • embedpress_v_320_migration
    • can_compress_scripts
    • embedpress_activation_redirect_done
    • widget_recent-posts
    • widget_recent-comments
    • embedpress
    • embedpress_elements_updated
    • widget_theysaidso_widget
    • embedpress_v_330_migration
    • db_upgraded
    • ...

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 37× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/embedpress/EmbedPress/Elementor/Embedpress_Elementor_Integration.php
    • > /wp-content/plugins/embedpress/EmbedPress/Ends/Handler.php
    • > /wp-content/plugins/embedpress/EmbedPress/Providers/GitHub.php
    • > /wp-content/plugins/embedpress/EmbedPress/Providers/Calendly.php
    • > /wp-content/plugins/embedpress/EmbedPress/AMP/Adapter/Twitter.php
    • > /wp-content/plugins/embedpress/EmbedPress/Loader.php
    • > /wp-content/plugins/embedpress/autoloader.php
    • > /wp-content/plugins/embedpress/EmbedPress/Providers/Giphy.php
    • > /wp-content/plugins/embedpress/EmbedPress/Compatibility.php
    • > /wp-content/plugins/embedpress/EmbedPress/Providers/GoogleDrive.php
  • 245× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Youtube.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Uppy.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Facebook.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/SmashNotes.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Podbean.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/embedpress/EmbedPress/Ends/Back/Settings/templates/google-calendar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Spreaker.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Cache\\CacheAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Cache/Filesystem.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/MedienArchivKuenste.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Embera\\Provider\\ProviderAdapter' not found in wp-content/plugins/embedpress/vendor/wpdevelopers/embera/src/Embera/Provider/Spotful.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (25 tag instead of maximum 10)
The official readme.txt might help

embedpress/embedpress.php 92% from 13 tests

The entry point to "EmbedPress - Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & Any Documents in Gutenberg & Elementor" version 3.9.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 224 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin144,235 lines of code in 467 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript291,60985696,831
PHP3116,2699,06928,777
CSS232,07423910,810
SVG982137,238
HTML34919389
JSON100106
Markdown117067
XML10017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.34
▷ Minimum class complexity1.00
▷ Maximum class complexity333.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces24
Interfaces4
Traits3
Classes268
▷ Abstract classes72.61%
▷ Concrete classes26197.39%
▷ Final classes10.38%
Methods1,313
▷ Static methods18213.86%
▷ Public methods1,20091.39%
▷ Protected methods826.25%
▷ Private methods312.36%
Functions53
▷ Named functions2954.72%
▷ Anonymous functions2445.28%
Constants88
▷ Global constants7281.82%
▷ Class constants1618.18%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
155 compressed PNG files occupy 0.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
EmbedPress/Ends/Back/Settings/assets/img/sources/icons/docdroid.png0.79KB0.87KB0.00%
EmbedPress/Ends/Back/Settings/assets/img/sources/icons/roosterteeth.png0.83KB0.81KB▼ 2.35%
EmbedPress/Ends/Back/Settings/assets/img/sources/icons/getshow.png0.60KB0.60KB0.00%
EmbedPress/Ends/Back/Settings/assets/img/sources/icons/medienarchiv.png0.44KB0.52KB0.00%
EmbedPress/Ends/Back/Settings/assets/img/sources/icons/toornament.png1.06KB1.12KB0.00%