You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8b288e9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: features/plugin-list-wporg-status.feature
+139Lines changed: 139 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,145 @@ Feature: Check the status of plugins on WordPress.org
111
111
| no-longer-in-directory | closed | 2017-11-13 |
112
112
| never-wporg | | |
113
113
114
+
@require-wp-5.2
115
+
Scenario: The wp.org last updated date for an active plugin does not depend on a second, rate-limited request
116
+
Given a WP install
117
+
And I run `wp plugin install wordpress-importer --version=0.5 --force`
118
+
And that HTTP requests to https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request%5Blocale%5D=en_US&request%5Bslug%5D=wordpress-importer will respond with:
119
+
"""
120
+
HTTP/1.1 200
121
+
Content-Type: application/json
122
+
123
+
{
124
+
"name": "WordPress Importer",
125
+
"slug": "wordpress-importer",
126
+
"last_updated": "2025-09-26 9:07pm GMT"
127
+
}
128
+
"""
129
+
# plugins.trac.wordpress.org is known to rate-limit this scrape (HTTP 429), with no
130
+
# pubDate in the response body. wporg_last_updated must still resolve correctly for an
131
+
# active plugin, because the date is meant to come from the plugin-info API response
132
+
# above, not from a second request to trac.
133
+
And that HTTP requests to https://plugins.trac.wordpress.org/log/wordpress-importer/?limit=1&mode=stop_on_copy&format=rss will respond with:
134
+
"""
135
+
HTTP/1.1 429
136
+
Content-Type: text/html
137
+
138
+
<html><body>429 Too Many Requests</body></html>
139
+
"""
140
+
141
+
When I run `wp plugin list --fields=name,wporg_status,wporg_last_updated`
142
+
Then STDOUT should be a table containing rows:
143
+
| name | wporg_status | wporg_last_updated |
144
+
| wordpress-importer | active | 2025-09-26 |
145
+
146
+
@require-wp-5.2
147
+
Scenario: The wp.org last updated date falls back to the trac log when the plugin-info API omits it
148
+
Given a WP install
149
+
And I run `wp plugin install wordpress-importer --version=0.5 --force`
150
+
And that HTTP requests to https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request%5Blocale%5D=en_US&request%5Bslug%5D=wordpress-importer will respond with:
151
+
"""
152
+
HTTP/1.1 200
153
+
Content-Type: application/json
154
+
155
+
{
156
+
"name": "WordPress Importer",
157
+
"slug": "wordpress-importer"
158
+
}
159
+
"""
160
+
And that HTTP requests to https://plugins.trac.wordpress.org/log/wordpress-importer/?limit=1&mode=stop_on_copy&format=rss will respond with:
When I run `wp plugin list --fields=name,wporg_status,wporg_last_updated`
176
+
Then STDOUT should be a table containing rows:
177
+
| name | wporg_status | wporg_last_updated |
178
+
| wordpress-importer | active | 2025-09-26 |
179
+
180
+
@require-wp-5.2
181
+
Scenario: The wp.org last updated date falls back to the trac log when the plugin-info API date can't be parsed
182
+
Given a WP install
183
+
And I run `wp plugin install wordpress-importer --version=0.5 --force`
184
+
And that HTTP requests to https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request%5Blocale%5D=en_US&request%5Bslug%5D=wordpress-importer will respond with:
185
+
"""
186
+
HTTP/1.1 200
187
+
Content-Type: application/json
188
+
189
+
{
190
+
"name": "WordPress Importer",
191
+
"slug": "wordpress-importer",
192
+
"last_updated": "not a date"
193
+
}
194
+
"""
195
+
And that HTTP requests to https://plugins.trac.wordpress.org/log/wordpress-importer/?limit=1&mode=stop_on_copy&format=rss will respond with:
# An unparsable API date must not be rendered as today's date, nor stop the
211
+
# trac log from being consulted as the fallback source of the date.
212
+
When I run `wp plugin list --fields=name,wporg_status,wporg_last_updated`
213
+
Then STDOUT should be a table containing rows:
214
+
| name | wporg_status | wporg_last_updated |
215
+
| wordpress-importer | active | 2025-09-26 |
216
+
217
+
@require-wp-5.2
218
+
Scenario: The wp.org last updated date stays empty when the trac log pubDate can't be parsed
219
+
Given a WP install
220
+
And I run `wp plugin install wordpress-importer --version=0.5 --force`
221
+
And that HTTP requests to https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request%5Blocale%5D=en_US&request%5Bslug%5D=wordpress-importer will respond with:
222
+
"""
223
+
HTTP/1.1 200
224
+
Content-Type: application/json
225
+
226
+
{
227
+
"name": "WordPress Importer",
228
+
"slug": "wordpress-importer"
229
+
}
230
+
"""
231
+
And that HTTP requests to https://plugins.trac.wordpress.org/log/wordpress-importer/?limit=1&mode=stop_on_copy&format=rss will respond with:
0 commit comments