4545function sse_get_client_ip () {
4646 // WordPress-style IP detection with validation.
4747 $ client_ip = 'unknown ' ;
48-
48+
4949 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- $_SERVER['REMOTE_ADDR'] is safe for IP logging when properly sanitized
5050 if ( isset ( $ _SERVER ['REMOTE_ADDR ' ] ) ) {
5151 $ client_ip = sanitize_text_field ( wp_unslash ( $ _SERVER ['REMOTE_ADDR ' ] ) );
@@ -165,11 +165,16 @@ function sse_get_execution_time_limit() {
165165 return 30 ;
166166 }
167167
168- return (int )$ max_exec_time ;
168+ return (int ) $ max_exec_time ;
169169
170170} //end sse_get_execution_time_limit()
171171
172172// --- Admin Menu ---
173+ /**
174+ * Adds the Site Exporter page to the WordPress admin menu.
175+ *
176+ * @return void
177+ */
173178function sse_admin_menu () {
174179 add_management_page (
175180 esc_html__ ( 'Simple WP Site Exporter ' , 'Simple-WP-Site-Exporter ' ), // Escaped title
@@ -182,6 +187,11 @@ function sse_admin_menu() {
182187add_action ( 'admin_menu ' , 'sse_admin_menu ' );
183188
184189// --- Exporter Page HTML ---
190+ /**
191+ * Renders the exporter page HTML interface.
192+ *
193+ * @return void
194+ */
185195function sse_exporter_page_html () {
186196 if ( ! current_user_can ( 'manage_options ' ) ) {
187197 wp_die ( esc_html__ ( 'You do not have permission to view this page. ' , 'Simple-WP-Site-Exporter ' ), 403 );
@@ -203,7 +213,7 @@ function sse_exporter_page_html() {
203213 <?php
204214 // printf is standard in WordPress for translatable strings with placeholders. All variables are escaped.
205215 printf (
206- /* translators: %s: directory path */
216+ // translators: %s: directory path
207217 esc_html__ ( 'Exported .zip files will be saved in the following directory on the server: %s ' , 'Simple-WP-Site-Exporter ' ),
208218 '<code> ' . esc_html ( $ display_path ) . '</code> '
209219 );
@@ -236,6 +246,8 @@ function sse_exporter_page_html() {
236246// --- Handle Export Action ---
237247/**
238248 * Handles the site export process when the form is submitted.
249+ *
250+ * @return void
239251 */
240252function sse_handle_export () {
241253 if ( ! sse_validate_export_request () ) {
0 commit comments