{"id":26793108,"url":"https://github.com/beapi/bea-media-analytics","last_synced_at":"2026-03-04T00:42:41.569Z","repository":{"id":145483168,"uuid":"112621073","full_name":"BeAPI/bea-media-analytics","owner":"BeAPI","description":"Find where and how media are used across your site.","archived":false,"fork":false,"pushed_at":"2023-09-25T10:05:43.000Z","size":9706,"stargazers_count":14,"open_issues_count":38,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-06-06T05:41:59.743Z","etag":null,"topics":["media","multisite","single-site","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/bea-media-analytics/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BeAPI.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-30T14:28:36.000Z","updated_at":"2024-10-08T14:33:47.000Z","dependencies_parsed_at":"2025-04-22T15:12:19.251Z","dependency_job_id":"db58a1a6-a269-4a37-a461-a9863b97784e","html_url":"https://github.com/BeAPI/bea-media-analytics","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/BeAPI/bea-media-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fbea-media-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fbea-media-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fbea-media-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fbea-media-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeAPI","download_url":"https://codeload.github.com/BeAPI/bea-media-analytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fbea-media-analytics/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259368020,"owners_count":22846825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["media","multisite","single-site","wordpress","wordpress-plugin"],"created_at":"2025-03-29T16:19:07.625Z","updated_at":"2026-03-04T00:42:41.479Z","avatar_url":"https://github.com/BeAPI.png","language":"PHP","funding_links":["https://www.paypal.me/BeAPI"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://beapi.fr\"\u003e![Be API Github Banner](.wordpress.org/banner-github.png)\u003c/a\u003e\n\n# BEA - Media Analytics\n\nIf you want to see which media is used and where ? This plugin is for you !\n\nBy installing this plugin you will index where your media are used, display further informations about how they are used and also warn you about deleting used ones.\nTherefore, you will easily [delete unused medias](#unused-media).\n\n# How ?\n\nA table is created for indexing where media are used. This is done when saving contents but could also be forced with the [wp-cli command](#force-indexation) or just by activating the plugin. \n\n# Requirements\n\n- [WordPress](https://wordpress.org/) 4.6+\n- Tested up to 4.9.3.\n- PHP 5.6+\n\n# Installation\n\nAt plugin activation, a single event will be added in order to index your contents. It generally takes 10-15 min to do so.\n\nAt plugin deactivation, all data stored by this plugin will be **deleted** to ensure not to weighing the DB and also for further safe reactivation.\n\n## WordPress\n\n- Download and install using the built-in WordPress plugin installer.\n- Site activate in the \"Plugins\" area of the admin.\n- Optionally drop the entire `bea-media-analytics` directory into mu-plugins.\n- Nothing more, this plugin is ready to use !\n\n## [Composer](http://composer.rarst.net/)\n\n- Add repository source : `{ \"type\": \"vcs\", \"url\": \"https://github.com/BeAPI/bea-media-analytics\" }`.\n- Include `\"bea/bea-media-analytics\": \"dev-master\"` in your composer file for last master's commits or a tag released.\n- Nothing more, this plugin is ready to use !\n\n# What ?\n\n## Features \n\nFor now the supported contents for indexation are post types by focusing on :\n\u003cul\u003e\n  \u003cli\u003ePost content ( gallery, image, links )\u003c/li\u003e\n  \u003cli\u003ePost thumbnail\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://www.advancedcustomfields.com/\"\u003eAdvanced Custom Fields PRO\u003c/a\u003e's fields :\n      \u003cul\u003e\n        \u003cli\u003e\"content fields\" :\n          \u003cul\u003e\n            \u003cli\u003eFile\u003c/li\u003e\n            \u003cli\u003eGallery\u003c/li\u003e\n            \u003cli\u003eImage\u003c/li\u003e\n            \u003cli\u003ePost object\u003c/li\u003e\n            \u003cli\u003ePage link\u003c/li\u003e\n            \u003cli\u003eRelationship\u003c/li\u003e\n            \u003cli\u003eTextarea\u003c/li\u003e\n            \u003cli\u003eWysiwyg\u003c/li\u003e\n          \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\"structuring fields\" which can reuse the above \"content fields\"\n          \u003cul\u003e\n            \u003cli\u003eClone\u003c/li\u003e\n            \u003cli\u003eFlexible\u003c/li\u003e\n            \u003cli\u003eGroup\u003c/li\u003e\n            \u003cli\u003eRepeater\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"https://acf-component-field.gummi.io/\"\u003eComponent\u003c/a\u003e\u003c/li\u003e\n          \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003eACF Options\u003c/li\u003e\n      \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://codecanyon.net/item/image-map-pro-for-wordpress-interactive-image-map-builder/2826664\"\u003eImage Map Pro\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n### 1 - Single media view\n\nIn the single edit view, a bloc has been added to display the number of usages, where and what type.\n\n![Single media view](.wordpress.org/screenshot-1.png)\n\n### 2 - Media library modal view\n\nIn the media library modal view, when a media is selected, a bloc has been added to display the number of usages.\n\n![Media library modal view](.wordpress.org/screenshot-2.png)\n\n### 3 - Media library view\n\nOn the media admin library view, an admin column has been added to display the number of usages.\n\n![Media library view](.wordpress.org/screenshot-3.png)\n\n### 4 - Prompt on media delete\n\nOn media delete, if it has usages (based on indexed contents), a warning will prompt to confirm the media deletion.\n\n![Prompt on media delete](.wordpress.org/screenshot-4.png)\n\n### Third party support\n\nThis plugin has third party support with following plugins :\n\n* [Content Sync Fusion](https://github.com/BeAPI/bea-content-sync-fusion) : the usage counter will now consider synced sites to reveal how many times a media has been used across all synchronized sites.\n\n## More features to come\n\nAs you can see, some [issues](../../issues?q=is%3Aissue+is%3Aopen+label%3Aquestion) are feature requests :\n- More fields support (excerpt, post meta, etc)\n- More type of support (widget, etc)\n- More support (elementor, visual composer, polylang, -wpml-, etc)\n- Media expiration\n- Media replacement\n- More file's mime types\n\n## Next Roadmap\n- [39](https://github.com/BeAPI/bea-media-analytics/issues/39) : Improve display\n- [33](https://github.com/BeAPI/bea-media-analytics/issues/33) : Ensure a lot of file's mime types support\n\n## Languages\n\nThis plugin is translated into the following languages :\n- English\n- French\n- More to come\n\n## Contributing\n\nPlease refer to the [contributing guidelines](.github/CONTRIBUTING.md) to increase the chance of your pull request to be merged and/or receive the best support for your issue.\n\n### Issues \u0026 features request / proposal\n\nIf you identify any errors or have an idea for improving the plugin, feel free to open an [issue](../../issues/new). Please provide as much info as needed in order to help us resolving / approve your request.\n\n### Translation request / proposal\n\nIf you want to translate BEA - Media Analytics, the best way is to use the official way :\n[WordPress.org GlotPress](https://translate.wordpress.org/projects/wp-plugins/bea-media-analytics).\n\nYou can, of course, just [create a pull request](../../compare) to our repository if you already done the translation.\n\n## For developers\n\n### WP-Cli\n\n[WP-CLi](http://wp-cli.org) has been implemented to execute some useful commands.\n\n#### Force indexation\n\nOnly on the given site, an indexation of all retrieved data from all supported contents : `wp bea_media_analytics index_site`\n \n##### Multisite\n\nOptionally on a multisite :\n* for a site : `wp bea_media_analytics index_site --url={url}`\n* for the entire network : `wp bea_media_analytics index_site --url={url}`\n* for all sites of all networks : `wp bea_media_analytics index_site --url=$(wp site list --fields=url)`\n\n#### Unused media\n\nQuickly retrieve unused media for the current site (even with Content Sync Fusion).\n\n##### List\n\nList all unused media : `wp bea_media_analytics unused list`\n\n##### Delete\n\nDelete all unused media : `wp bea_media_analytics unused delete`\n\n### REST Api\n\nThe [REST Api](https://developer.wordpress.org/rest-api/) has been used to display the number of usage for an attachment. The route `exemple.com/wp-json/wp/v2/media/{id}/` will return a custom field called `bea_media_analytics_counter` which represents how many times it has been used into supported contents.\n\n### JSON API\n\nWordPress is working a lot with the JSON API, that's why why the `bea_media_analytics_counter` attribute has been added into attachment's JSON responses.\n\n# Who ?\n\nCreated by [Be API](https://beapi.fr), the French WordPress leader agency since 2009. Based in Paris, we are more than 30 people and always [hiring](https://beapi.workable.com) some fun and talented guys. So we will be pleased to work with you.\n\nThis plugin is only maintained, which means we do not guarantee some free support. Consider reporting an [issue](#issues--features-request--proposal) and be patient. \n\nIf you really like what we do or want to thank us for our quick work, feel free to [donate](https://www.paypal.me/BeAPI) as much as you want / can, even 1€ is a great gift for buying cofee :)\n\n## License\n\nBEA - Media Analytics is licensed under the [GPLv3 or later](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapi%2Fbea-media-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeapi%2Fbea-media-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapi%2Fbea-media-analytics/lists"}