Your plugin does no checking at all, such as “does the post already exists?”
Accordingly, it creates a post each time WordPress is called.
There is a system called WordPress heartbeat, which contacts the server every few seconds. Your plugin is called each time, and a post is created.
For reference, the Heartbeat doc.
Related Posts:
- Is there a faster way than wp_insert_post to add content to a blog
- Use wp_set_post_terms() instead of wp_insert_post()
- update post meta for checkbox in the admin when inserted in the front-end
- Set page template programaticlly in plugin
- Remove all removed pages from wordpress
- How to get custom post_author?
- Multiple array for post_content on plugin activation
- Plugin to create Posts and Forums then choose category and parent forum
- Creating posts with links from a txt file
- Using wp_mail to send email?
- How to show comments from different Plugins to same post type?
- How to check if `comment_meta` exists before inserting the comment?
- How to get the `comment_post_ID`?
- Posts form with AJAX request – Plugin development
- Custom plugin foreach wp_insert_post not working
- Sanitize WordPress Array Input?
- Getting duplicate page when activating my plugin
- Add Page With Parent ID
- Yet another wp_insert_post infinite loop. What is wrong?
- Looking for WordPress System Diagrams
- How to output message during plugin activation
- How to provide translations for a WordPress TinyMCE plugin?
- Where do I start from
- Where is it better to start learning how to develop for WordPress?
- Check the Version of an Enqueue’d External Library
- Is there any way to test if a function running only on plugin update is successfully running?
- Change of query var in pre_get_posts not maintained
- Hook for post permalink update
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- How to Parse an Array of Elements in Gutenberg Block
- Load page template with custom content using a plugin
- Custom rewrite rule serves content, but returns 404 error code
- Will changing the ‘Plugin Name’ header in the next update of a plugin break anything?
- Performance of several get_option() calls
- How to edit mySQL wp_posts table from plugin php?
- Creating a Wordpess Plugin that writes data to a csv file. The data doesn’t show in the csv file?
- Problem with is_active_sidebar?
- Prevent Plugin from loading on ‘wp-admin / wp-login’
- Widget update function not saving values
- Getting admin notices working for plugin errors
- override pluggable.php functions
- An echo line in a transition_post_status action leads to “cannot modify header information – headers already sent by”
- get_the_excerpt() is not returning an empty string when the_excerpt is blank?
- “Plugin could not be activated because it triggered a fatal error.”
- Does the order of sections in readme.txt matter?
- Add column in WP user but it goes wrong
- How to remove the current post from the query?
- Passing nonce at admin menu link
- Is file_get_contents() the only way for plugins reading local files OR does WP_Filesystem_Direct::get_contents() even work?
- how to get up row in wordpress with wpdb
- Preview plugin store details
- Hook into Jetpacks Publicize without using a post type
- Get attachments from a post
- How to remove default style of header in wordpress metabox
- TEMPLATEPATH without the theme name? No THEMEPATH constant?
- wp_update_post deletes post meta in CPT
- Update Data parameter of a wp_localize_script() call
- Checking a WordPress for OWASP top 10 vulnerabilities [closed]
- flush rewrite rules after plugin update?
- Download button in a plugin’s settings page
- hook filter after the_content on a specific page
- The Correct Way to Use Nonce Field without Settings API
- Run command “composer install” when activating wordpress plugin
- Data not insert and update through ajax and jQuery in admin page?
- Import user data using CSV
- How to submit/upload data to database and in specific folder?
- OOP plugin not working
- Plugin settings are saving but the fields
- Plugin Options not saving options and doesn’t work
- WordPress dynamic widget by location?
- JQuery Slider – Similar to www.internetmarketinginc.com [closed]
- Development plugin to view and manage scheduled wordpress cron jobs?
- Add user managable titles to custom menus?
- WordPress video js error this.mediaElement.play is not a function
- Custom Icon for Plugin
- WP_Query order posts by category
- How to override supports of innerBlocks?
- Implications of creating a plugin that adds functionality to other developer’s plugin?
- First page download plugin
- why is update_user_meta creating arrays when trying to change the same value?
- Don’t print customizer styles when no setting has been used
- Load custom translation in custom plugin fails
- Buddy Press restrict the capability to edit users
- “Headers Already Sent” Nightmare on Plugin
- Uncaught ReferenceError: kpoejy is not defined
- How to get an array out of a nav menu if it’s a plugin?
- Is there better way to do this without duplicating queries?
- How to create a simple plugin which show/hide an html code in wordpress?
- Is there a way to make is_search() always return false
- How to create custom frontend php page via plugin
- Translation of plugin Upload button
- Create wordpress dashboard metabox which spans all columns
- add_filter adds output in the head
- How can i add insertion point between inner blocks in my custom block like core blocks
- Update option hook not firing
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Calling get_header() with installed FSE theme
- Reinitiate Gutenburg’s blocks using javascript
- Generating Multiple Divi Pages from Database