Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid - Version 2.0.0.202102021049

Version Description

Download this release

Release Info

Developer boldgrid
Plugin Icon 128x128 Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid
Version 2.0.0.202102021049
Comparing to
See all releases

Code changes from version 2.0.0.202101190945 to 2.0.0.202102021049

admin/class-boldgrid-backup-admin-archive.php CHANGED
@@ -188,10 +188,22 @@ class Boldgrid_Backup_Admin_Archive {
188
  * @return bool
189
  */
190
  public function delete( $filepath ) {
 
191
  $deleted = $this->core->wp_filesystem->delete( $filepath, false, 'f' );
192
 
 
193
  $this->core->archive_log->delete_by_zip( $filepath );
194
 
 
 
 
 
 
 
 
 
 
 
195
  return $deleted;
196
  }
197
 
@@ -561,6 +573,10 @@ class Boldgrid_Backup_Admin_Archive {
561
  $this->log_filename = null;
562
  $this->log = array();
563
  $this->compressor = null;
 
 
 
 
564
  }
565
 
566
  /**
@@ -701,12 +717,16 @@ class Boldgrid_Backup_Admin_Archive {
701
  $validation_results = $this->validate_link_request( $filename );
702
 
703
  if ( $validation_results['is_valid'] ) {
 
 
 
704
  $expires = strtotime( '+' . $this->core->configs['public_link_lifetime'] );
705
  $token = Boldgrid_Backup_Authentication::create_token( $filename, $expires );
 
706
 
707
  $response['download_url'] = get_site_url(
708
  null,
709
- 'wp-admin/admin-ajax.php?action=boldgrid_backup_download&t=' . $token
710
  );
711
 
712
  $response['expires_when'] = human_time_diff(
188
  * @return bool
189
  */
190
  public function delete( $filepath ) {
191
+ // Delete the .zip.
192
  $deleted = $this->core->wp_filesystem->delete( $filepath, false, 'f' );
193
 
194
+ // Delete the .log.
195
  $this->core->archive_log->delete_by_zip( $filepath );
196
 
197
+ /*
198
+ * Delete the folder.
199
+ *
200
+ * Introduced in SINCEVERSION - virtual backups.
201
+ */
202
+ $folder_path = \Boldgrid\Backup\Utility\Virtual_Folder::folder_by_zip( $filepath );
203
+ if ( $this->core->wp_filesystem->exists( $folder_path ) ) {
204
+ $this->core->wp_filesystem->delete( $folder_path, true, 'd' );
205
+ }
206
+
207
  return $deleted;
208
  }
209
 
573
  $this->log_filename = null;
574
  $this->log = array();
575
  $this->compressor = null;
576
+
577
+ // Virtual.
578
+ $this->is_virtual = null;
579
+ $this->virtual = null;
580
  }
581
 
582
  /**
717
  $validation_results = $this->validate_link_request( $filename );
718
 
719
  if ( $validation_results['is_valid'] ) {
720
+ // Initialize this backup so we have access to properties (like is_virtual).
721
+ $this->init_by_filename( $filename );
722
+
723
  $expires = strtotime( '+' . $this->core->configs['public_link_lifetime'] );
724
  $token = Boldgrid_Backup_Authentication::create_token( $filename, $expires );
725
+ $type = $this->is_virtual ? 'many' : 'one';
726
 
727
  $response['download_url'] = get_site_url(
728
  null,
729
+ 'wp-admin/admin-ajax.php?action=boldgrid_backup_download&t=' . $token . '&type=' . $type
730
  );
731
 
732
  $response['expires_when'] = human_time_diff(
admin/class-boldgrid-backup-admin-upload.php CHANGED
@@ -426,11 +426,33 @@ class Boldgrid_Backup_Admin_Upload {
426
 
427
  $url = ! empty( $_POST['url'] ) ? esc_url_raw( $_POST['url'] ) : null;
428
 
429
- $archive_fetcher = new Boldgrid_Backup_Archive_Fetcher( $url );
430
- $archive_fetcher->download();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
- if ( $archive_fetcher->has_error() ) {
433
- wp_send_json_error( [ 'error' => $archive_fetcher->get_error() ] );
434
  } else {
435
  wp_send_json_success( $archive_fetcher->get_info() );
436
  }
426
 
427
  $url = ! empty( $_POST['url'] ) ? esc_url_raw( $_POST['url'] ) : null;
428
 
429
+ $url_params = Boldgrid_Backup_Admin_Utility::get_url_params( $url );
430
+
431
+ if ( isset( $url_params['type'] ) && 'many' === $url_params['type'] ) {
432
+ $archive_fetcher = \Boldgrid\Backup\V2\Fetcher\Factory::run();
433
+ $archive_fetcher->get_info()->set_key( 'download_url', $url );
434
+ $archive_fetcher->run();
435
+
436
+ // Set our success status and any possible error messages.
437
+ $error = '';
438
+ $success = ! $archive_fetcher->is_fail();
439
+ if ( ! $success ) {
440
+ $error = $archive_fetcher->info->get_key( 'error' );
441
+ }
442
+ } else {
443
+ $archive_fetcher = new Boldgrid_Backup_Archive_Fetcher( $url );
444
+ $archive_fetcher->download();
445
+
446
+ // Set our success status and any possible error messages.
447
+ $error = '';
448
+ $success = ! $archive_fetcher->has_error();
449
+ if ( ! $success ) {
450
+ $error = $archive_fetcher->get_error();
451
+ }
452
+ }
453
 
454
+ if ( ! $success ) {
455
+ wp_send_json_error( [ 'error' => $error ] );
456
  } else {
457
  wp_send_json_success( $archive_fetcher->get_info() );
458
  }
admin/class-boldgrid-backup-admin-utility.php CHANGED
@@ -323,6 +323,58 @@ class Boldgrid_Backup_Admin_Utility {
323
  return true;
324
  }
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  /**
327
  * Whether or not a string starts with another.
328
  *
@@ -422,6 +474,24 @@ class Boldgrid_Backup_Admin_Utility {
422
  return $min;
423
  }
424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  /**
426
  * Increase the PHP memory limit.
427
  *
323
  return true;
324
  }
325
 
326
+ /**
327
+ *
328
+ */
329
+ public static function move_dir( $source_dir, $destination_dir, $level = 0 ) {
330
+ $level++;
331
+
332
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
333
+
334
+ if ( ! $core->wp_filesystem->exists( $source_dir ) ) {
335
+ return false;
336
+ }
337
+
338
+ if ( ! $core->wp_filesystem->exists( $destination_dir ) ) {
339
+ $made = $core->wp_filesystem->mkdir( $destination_dir );
340
+ if ( ! $made ) {
341
+ return false;
342
+ }
343
+ }
344
+
345
+ $source_dir = trailingslashit( $source_dir );
346
+ $destination_dir = trailingslashit( $destination_dir );
347
+
348
+ $dirlist = $core->wp_filesystem->dirlist( $source_dir );
349
+
350
+ foreach ( $dirlist as $data ) {
351
+ if ( 'f' === $data['type'] ) {
352
+ $source_file = $source_dir . $data['name'];
353
+ $destination_file = $destination_dir . $data['name'];
354
+
355
+ // Try to copy the file. If we can't, abort.
356
+ if ( ! $core->wp_filesystem->copy( $source_file, $destination_file ) ) {
357
+ return false;
358
+ }
359
+ } elseif ( 'd' === $data['type'] ) {
360
+ // Recursion. Try to move this sub folder.
361
+ if ( ! self::move_dir( $source_dir . $data['name'], $destination_dir . $data['name'], $level ) ) {
362
+ return false;
363
+ }
364
+ }
365
+ }
366
+
367
+ /*
368
+ * We're moving directories, not copying, so delete the source directory. Only do this if this
369
+ * is the highest level. If something went wrong, leave the original directory intact.
370
+ */
371
+ if ( 1 === $level ) {
372
+ $core->wp_filesystem->rmdir( $source_dir );
373
+ }
374
+
375
+ return true;
376
+ }
377
+
378
  /**
379
  * Whether or not a string starts with another.
380
  *
474
  return $min;
475
  }
476
 
477
+ /**
478
+ * Get url params from a full url.
479
+ *
480
+ * A shortcut, uses both parse_url and parse_str.
481
+ *
482
+ * @since SINCEVERSION
483
+ *
484
+ * @param string $url A full url.
485
+ * @return array
486
+ */
487
+ public static function get_url_params( $url ) {
488
+ $url_query = wp_parse_url( $url, PHP_URL_QUERY );
489
+
490
+ parse_str( $url_query, $query_params );
491
+
492
+ return $query_params;
493
+ }
494
+
495
  /**
496
  * Increase the PHP memory limit.
497
  *
boldgrid-backup-cron.php CHANGED
@@ -60,6 +60,7 @@ $valid_modes = array(
60
  'backup',
61
  'restore',
62
  'resume',
 
63
  'resume_restore',
64
  );
65
 
60
  'backup',
61
  'restore',
62
  'resume',
63
+ 'resume_fetch',
64
  'resume_restore',
65
  );
66
 
cli/{verify-e6eeecf208664c73c9b32c22901272aa.php → verify-0228d2d0313a8c30ecd8c8467070ed39.php} RENAMED
File without changes
coverage.xml CHANGED
@@ -1,6 +1,6 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1611068116">
3
- <project timestamp="1611068116">
4
  <package name="Boldgrid\Backup\Admin\Card">
5
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
6
  <class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
@@ -1160,7 +1160,7 @@
1160
  </file>
1161
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-archive.php">
1162
  <class name="Boldgrid_Backup_Admin_Archive" namespace="global" fullPackage="Boldgrid.Backup.Admin">
1163
- <metrics complexity="79" methods="26" coveredmethods="16" conditionals="0" coveredconditionals="0" statements="219" coveredstatements="106" elements="245" coveredelements="122"/>
1164
  </class>
1165
  <line num="174" type="method" name="__construct" visibility="public" complexity="2" crap="2" count="41"/>
1166
  <line num="175" type="stmt" count="41"/>
@@ -1168,246 +1168,255 @@
1168
  <line num="177" type="stmt" count="12"/>
1169
  <line num="179" type="stmt" count="41"/>
1170
  <line num="180" type="stmt" count="41"/>
1171
- <line num="190" type="method" name="delete" visibility="public" complexity="1" crap="1" count="4"/>
1172
- <line num="191" type="stmt" count="4"/>
1173
- <line num="193" type="stmt" count="4"/>
1174
  <line num="195" type="stmt" count="4"/>
1175
- <line num="206" type="method" name="get_attribute" visibility="public" complexity="2" crap="2" count="9"/>
1176
- <line num="207" type="stmt" count="9"/>
1177
- <line num="229" type="method" name="get_by_name" visibility="public" complexity="3" crap="12" count="0"/>
1178
- <line num="230" type="stmt" count="0"/>
1179
- <line num="232" type="stmt" count="0"/>
1180
- <line num="234" type="stmt" count="0"/>
1181
- <line num="235" type="stmt" count="0"/>
1182
- <line num="236" type="stmt" count="0"/>
1183
- <line num="237" type="stmt" count="0"/>
1184
- <line num="238" type="stmt" count="0"/>
1185
- <line num="240" type="stmt" count="0"/>
1186
  <line num="242" type="stmt" count="0"/>
1187
- <line num="254" type="method" name="get_file" visibility="public" complexity="5" crap="15.55" count="1"/>
1188
- <line num="255" type="stmt" count="1"/>
1189
- <line num="256" type="stmt" count="1"/>
1190
- <line num="259" type="stmt" count="0"/>
1191
- <line num="261" type="stmt" count="0"/>
1192
- <line num="264" type="stmt" count="0"/>
1193
- <line num="265" type="stmt" count="0"/>
1194
- <line num="266" type="stmt" count="0"/>
1195
- <line num="268" type="stmt" count="0"/>
1196
- <line num="279" type="method" name="get_dump_file" visibility="public" complexity="1" crap="1" count="1"/>
1197
- <line num="285" type="stmt" count="1"/>
1198
- <line num="295" type="method" name="get_filesize" visibility="public" complexity="2" crap="2" count="9"/>
1199
- <line num="296" type="stmt" count="9"/>
1200
- <line num="297" type="stmt" count="4"/>
1201
- <line num="299" type="stmt" count="9"/>
1202
- <line num="310" type="method" name="get_id" visibility="public" complexity="1" crap="1" count="5"/>
1203
- <line num="311" type="stmt" count="5"/>
1204
- <line num="321" type="method" name="get_index" visibility="public" complexity="3" crap="3" count="13"/>
1205
- <line num="322" type="stmt" count="13"/>
1206
- <line num="324" type="stmt" count="13"/>
1207
- <line num="326" type="stmt" count="13"/>
1208
- <line num="327" type="stmt" count="13"/>
1209
- <line num="328" type="stmt" count="12"/>
1210
- <line num="329" type="stmt" count="12"/>
1211
- <line num="331" type="stmt" count="13"/>
1212
- <line num="333" type="stmt" count="13"/>
1213
- <line num="344" type="method" name="get_key" visibility="public" complexity="1" crap="1" count="1"/>
1214
- <line num="345" type="stmt" count="1"/>
1215
- <line num="355" type="method" name="init" visibility="public" complexity="8" crap="8" count="13"/>
1216
- <line num="356" type="stmt" count="13"/>
1217
- <line num="358" type="stmt" count="13"/>
1218
- <line num="359" type="stmt" count="0"/>
1219
- <line num="362" type="stmt" count="13"/>
1220
- <line num="364" type="stmt" count="13"/>
1221
- <line num="365" type="stmt" count="13"/>
1222
- <line num="367" type="stmt" count="13"/>
 
1223
  <line num="368" type="stmt" count="13"/>
1224
- <line num="369" type="stmt" count="13"/>
1225
- <line num="370" type="stmt" count="4"/>
1226
- <line num="371" type="stmt" count="4"/>
1227
- <line num="373" type="stmt" count="13"/>
1228
  <line num="374" type="stmt" count="13"/>
 
1229
  <line num="377" type="stmt" count="13"/>
1230
- <line num="378" type="stmt" count="13"/>
1231
- <line num="379" type="stmt" count="2"/>
1232
- <line num="380" type="stmt" count="2"/>
1233
- <line num="382" type="stmt" count="13"/>
1234
- <line num="383" type="stmt" count="12"/>
1235
- <line num="385" type="stmt" count="12"/>
1236
- <line num="386" type="stmt" count="12"/>
 
 
 
 
1237
  <line num="394" type="stmt" count="13"/>
1238
- <line num="396" type="stmt" count="13"/>
1239
- <line num="398" type="stmt" count="13"/>
1240
- <line num="399" type="stmt" count="13"/>
1241
- <line num="411" type="method" name="init_by_filename" visibility="public" complexity="1" crap="1" count="12"/>
1242
- <line num="412" type="stmt" count="12"/>
1243
- <line num="414" type="stmt" count="12"/>
1244
- <line num="415" type="stmt" count="12"/>
1245
- <line num="425" type="method" name="init_by_key" visibility="public" complexity="3" crap="3" count="2"/>
1246
- <line num="426" type="stmt" count="2"/>
1247
- <line num="428" type="stmt" count="2"/>
1248
- <line num="430" type="stmt" count="2"/>
1249
- <line num="431" type="stmt" count="1"/>
1250
- <line num="434" type="stmt" count="2"/>
1251
- <line num="436" type="stmt" count="2"/>
1252
- <line num="437" type="stmt" count="2"/>
1253
  <line num="438" type="stmt" count="2"/>
1254
- <line num="444" type="stmt" count="2"/>
1255
- <line num="453" type="method" name="init_by_latest" visibility="public" complexity="2" crap="2" count="1"/>
1256
- <line num="454" type="stmt" count="1"/>
1257
- <line num="456" type="stmt" count="1"/>
1258
- <line num="457" type="stmt" count="1"/>
1259
- <line num="458" type="stmt" count="1"/>
1260
- <line num="459" type="stmt" count="1"/>
1261
- <line num="469" type="method" name="is_archive" visibility="public" complexity="3" crap="3" count="3"/>
1262
- <line num="470" type="stmt" count="3"/>
1263
- <line num="471" type="stmt" count="3"/>
1264
- <line num="472" type="stmt" count="3"/>
1265
- <line num="474" type="stmt" count="3"/>
1266
- <line num="475" type="stmt" count="3"/>
1267
- <line num="476" type="stmt" count="2"/>
1268
- <line num="477" type="stmt" count="2"/>
1269
- <line num="479" type="stmt" count="3"/>
1270
- <line num="481" type="stmt" count="3"/>
1271
- <line num="495" type="method" name="is_site_archive" visibility="public" complexity="4" crap="4.18" count="13"/>
1272
- <line num="496" type="stmt" count="13"/>
1273
- <line num="499" type="stmt" count="13"/>
1274
- <line num="500" type="stmt" count="13"/>
1275
- <line num="501" type="stmt" count="13"/>
1276
- <line num="505" type="stmt" count="13"/>
1277
- <line num="506" type="stmt" count="0"/>
1278
- <line num="510" type="stmt" count="13"/>
1279
- <line num="511" type="stmt" count="0"/>
1280
- <line num="514" type="stmt" count="13"/>
1281
- <line num="528" type="method" name="is_stored_locally" visibility="public" complexity="2" crap="2" count="1"/>
1282
- <line num="529" type="stmt" count="1"/>
1283
- <line num="531" type="stmt" count="1"/>
1284
- <line num="532" type="stmt" count="1"/>
1285
- <line num="545" type="method" name="is_stored_remotely" visibility="public" complexity="2" crap="2" count="1"/>
1286
- <line num="546" type="stmt" count="1"/>
1287
- <line num="548" type="stmt" count="1"/>
1288
- <line num="549" type="stmt" count="1"/>
1289
- <line num="557" type="method" name="reset" visibility="public" complexity="1" crap="1" count="13"/>
1290
- <line num="558" type="stmt" count="13"/>
1291
- <line num="559" type="stmt" count="13"/>
1292
- <line num="560" type="stmt" count="13"/>
1293
- <line num="561" type="stmt" count="13"/>
1294
- <line num="562" type="stmt" count="13"/>
1295
- <line num="563" type="stmt" count="13"/>
1296
- <line num="564" type="stmt" count="13"/>
1297
- <line num="575" type="method" name="set_attribute" visibility="public" complexity="3" crap="12" count="0"/>
1298
- <line num="576" type="stmt" count="0"/>
1299
- <line num="579" type="stmt" count="0"/>
1300
- <line num="580" type="stmt" count="0"/>
 
 
 
 
 
 
 
 
1301
  <line num="596" type="stmt" count="0"/>
1302
- <line num="598" type="stmt" count="0"/>
1303
- <line num="600" type="stmt" count="0"/>
1304
- <line num="610" type="method" name="set_id" visibility="public" complexity="1" crap="1" count="5"/>
1305
- <line num="611" type="stmt" count="5"/>
1306
- <line num="612" type="stmt" count="5"/>
1307
- <line num="623" type="method" name="update_timestamp" visibility="public" complexity="3" crap="12" count="0"/>
1308
- <line num="625" type="stmt" count="0"/>
1309
- <line num="626" type="stmt" count="0"/>
1310
- <line num="629" type="stmt" count="0"/>
1311
- <line num="642" type="method" name="validate_link_request" visibility="public" complexity="8" crap="72" count="0"/>
1312
- <line num="643" type="stmt" count="0"/>
1313
- <line num="646" type="stmt" count="0"/>
1314
- <line num="647" type="stmt" count="0"/>
1315
- <line num="648" type="stmt" count="0"/>
1316
- <line num="651" type="stmt" count="0"/>
1317
- <line num="652" type="stmt" count="0"/>
1318
- <line num="653" type="stmt" count="0"/>
1319
- <line num="656" type="stmt" count="0"/>
1320
- <line num="657" type="stmt" count="0"/>
1321
- <line num="658" type="stmt" count="0"/>
1322
- <line num="660" type="stmt" count="0"/>
1323
- <line num="661" type="stmt" count="0"/>
1324
  <line num="664" type="stmt" count="0"/>
1325
  <line num="667" type="stmt" count="0"/>
1326
  <line num="668" type="stmt" count="0"/>
1327
  <line num="669" type="stmt" count="0"/>
1328
- <line num="671" type="stmt" count="0"/>
1329
  <line num="673" type="stmt" count="0"/>
1330
  <line num="674" type="stmt" count="0"/>
1331
- <line num="675" type="stmt" count="0"/>
1332
  <line num="677" type="stmt" count="0"/>
1333
- <line num="678" type="stmt" count="0"/>
1334
  <line num="680" type="stmt" count="0"/>
1335
- <line num="681" type="stmt" count="0"/>
1336
- <line num="682" type="stmt" count="0"/>
1337
  <line num="684" type="stmt" count="0"/>
1338
- <line num="700" type="method" name="generate_download_link" visibility="public" complexity="2" crap="6" count="0"/>
1339
- <line num="701" type="stmt" count="0"/>
1340
- <line num="703" type="stmt" count="0"/>
1341
- <line num="704" type="stmt" count="0"/>
1342
- <line num="705" type="stmt" count="0"/>
1343
- <line num="707" type="stmt" count="0"/>
1344
- <line num="708" type="stmt" count="0"/>
1345
- <line num="710" type="stmt" count="0"/>
1346
- <line num="712" type="stmt" count="0"/>
1347
- <line num="713" type="stmt" count="0"/>
1348
- <line num="714" type="stmt" count="0"/>
1349
- <line num="715" type="stmt" count="0"/>
1350
- <line num="716" type="stmt" count="0"/>
1351
  <line num="717" type="stmt" count="0"/>
1352
- <line num="720" type="stmt" count="0"/>
1353
- <line num="755" type="method" name="write_results_file" visibility="public" complexity="6" crap="42" count="0"/>
1354
- <line num="756" type="stmt" count="0"/>
1355
- <line num="757" type="stmt" count="0"/>
1356
- <line num="758" type="stmt" count="0"/>
1357
- <line num="759" type="stmt" count="0"/>
1358
- <line num="761" type="stmt" count="0"/>
1359
- <line num="762" type="stmt" count="0"/>
1360
- <line num="763" type="stmt" count="0"/>
1361
- <line num="764" type="stmt" count="0"/>
1362
- <line num="765" type="stmt" count="0"/>
1363
- <line num="766" type="stmt" count="0"/>
1364
- <line num="767" type="stmt" count="0"/>
1365
- <line num="768" type="stmt" count="0"/>
1366
- <line num="769" type="stmt" count="0"/>
1367
- <line num="770" type="stmt" count="0"/>
1368
- <line num="771" type="stmt" count="0"/>
1369
- <line num="773" type="stmt" count="0"/>
1370
- <line num="774" type="stmt" count="0"/>
1371
- <line num="775" type="stmt" count="0"/>
1372
  <line num="776" type="stmt" count="0"/>
1373
  <line num="777" type="stmt" count="0"/>
1374
  <line num="778" type="stmt" count="0"/>
1375
  <line num="779" type="stmt" count="0"/>
1376
- <line num="780" type="stmt" count="0"/>
1377
  <line num="781" type="stmt" count="0"/>
 
1378
  <line num="783" type="stmt" count="0"/>
 
 
1379
  <line num="786" type="stmt" count="0"/>
1380
  <line num="787" type="stmt" count="0"/>
1381
  <line num="788" type="stmt" count="0"/>
1382
  <line num="789" type="stmt" count="0"/>
1383
  <line num="790" type="stmt" count="0"/>
1384
  <line num="791" type="stmt" count="0"/>
1385
- <line num="792" type="stmt" count="0"/>
1386
  <line num="793" type="stmt" count="0"/>
1387
  <line num="794" type="stmt" count="0"/>
1388
  <line num="795" type="stmt" count="0"/>
 
1389
  <line num="797" type="stmt" count="0"/>
1390
  <line num="798" type="stmt" count="0"/>
1391
  <line num="799" type="stmt" count="0"/>
 
1392
  <line num="801" type="stmt" count="0"/>
1393
- <line num="802" type="stmt" count="0"/>
1394
- <line num="804" type="stmt" count="0"/>
1395
- <line num="816" type="method" name="delete_from_archive" visibility="public" complexity="9" crap="12.69" count="9"/>
1396
- <line num="817" type="stmt" count="9"/>
1397
- <line num="818" type="stmt" count="9"/>
1398
- <line num="819" type="stmt" count="9"/>
1399
- <line num="821" type="stmt" count="9"/>
1400
- <line num="822" type="stmt" count="9"/>
1401
- <line num="823" type="stmt" count="9"/>
 
 
 
 
 
 
 
1402
  <line num="824" type="stmt" count="0"/>
1403
- <line num="826" type="stmt" count="0"/>
1404
- <line num="827" type="stmt" count="0"/>
1405
- <line num="828" type="stmt" count="0"/>
1406
- <line num="829" type="stmt" count="0"/>
1407
- <line num="830" type="stmt" count="9"/>
1408
- <line num="831" type="stmt" count="9"/>
1409
- <line num="832" type="stmt" count="9"/>
1410
- <metrics loc="833" ncloc="394" classes="1" methods="26" coveredmethods="16" conditionals="0" coveredconditionals="0" statements="219" coveredstatements="106" elements="245" coveredelements="122"/>
 
 
 
 
 
 
 
 
1411
  </file>
1412
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-archiver-utility.php">
1413
  <class name="Boldgrid_Backup_Admin_Archiver_Utility" namespace="global" fullPackage="Boldgrid.Backup.Admin.Archiver">
@@ -7637,7 +7646,7 @@
7637
  </file>
7638
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-upload.php">
7639
  <class name="Boldgrid_Backup_Admin_Upload" namespace="global" fullPackage="Boldgrid.Backup.Admin">
7640
- <metrics complexity="34" methods="9" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="161" coveredstatements="2" elements="170" coveredelements="3"/>
7641
  </class>
7642
  <line num="39" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="29"/>
7643
  <line num="41" type="stmt" count="29"/>
@@ -7780,7 +7789,7 @@
7780
  <line num="380" type="stmt" count="0"/>
7781
  <line num="382" type="stmt" count="0"/>
7782
  <line num="384" type="stmt" count="0"/>
7783
- <line num="403" type="method" name="ajax_url_import" visibility="public" complexity="5" crap="30" count="0"/>
7784
  <line num="404" type="stmt" count="0"/>
7785
  <line num="405" type="stmt" count="0"/>
7786
  <line num="406" type="stmt" count="0"/>
@@ -7797,19 +7806,35 @@
7797
  <line num="425" type="stmt" count="0"/>
7798
  <line num="427" type="stmt" count="0"/>
7799
  <line num="429" type="stmt" count="0"/>
7800
- <line num="430" type="stmt" count="0"/>
7801
  <line num="432" type="stmt" count="0"/>
7802
  <line num="433" type="stmt" count="0"/>
7803
  <line num="434" type="stmt" count="0"/>
7804
- <line num="435" type="stmt" count="0"/>
7805
  <line num="437" type="stmt" count="0"/>
7806
- <line num="444" type="method" name="archive_upload_action" visibility="public" complexity="3" crap="12" count="0"/>
7807
- <line num="445" type="stmt" count="0"/>
7808
- <line num="446" type="stmt" count="0"/>
 
 
 
 
7809
  <line num="447" type="stmt" count="0"/>
7810
  <line num="448" type="stmt" count="0"/>
7811
  <line num="449" type="stmt" count="0"/>
7812
- <metrics loc="450" ncloc="228" classes="1" methods="9" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="161" coveredstatements="2" elements="170" coveredelements="3"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
7813
  </file>
7814
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-usage.php">
7815
  <class name="Boldgrid_Backup_Admin_Usage" namespace="global" fullPackage="Boldgrid.Backup.Admin">
@@ -7846,7 +7871,7 @@
7846
  </file>
7847
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-utility.php">
7848
  <class name="Boldgrid_Backup_Admin_Utility" namespace="global" fullPackage="Boldgrid.Backup.Admin">
7849
- <metrics complexity="86" methods="22" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="300" coveredstatements="44" elements="322" coveredelements="47"/>
7850
  </class>
7851
  <line num="34" type="method" name="bytes_to_human" visibility="public" complexity="3" crap="3" count="9"/>
7852
  <line num="36" type="stmt" count="9"/>
@@ -7982,174 +8007,171 @@
7982
  <line num="320" type="stmt" count="0"/>
7983
  <line num="321" type="stmt" count="0"/>
7984
  <line num="323" type="stmt" count="0"/>
7985
- <line num="335" type="method" name="starts_with" visibility="public" complexity="1" crap="1" count="1"/>
7986
- <line num="336" type="stmt" count="1"/>
7987
- <line num="351" type="method" name="bump_max_execution" visibility="public" complexity="7" crap="56" count="0"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
7988
  <line num="353" type="stmt" count="0"/>
7989
- <line num="354" type="stmt" count="0"/>
7990
- <line num="358" type="stmt" count="0"/>
7991
  <line num="359" type="stmt" count="0"/>
7992
- <line num="363" type="stmt" count="0"/>
7993
- <line num="367" type="stmt" count="0"/>
7994
- <line num="368" type="stmt" count="0"/>
7995
- <line num="370" type="stmt" count="0"/>
7996
  <line num="371" type="stmt" count="0"/>
 
7997
  <line num="373" type="stmt" count="0"/>
7998
  <line num="375" type="stmt" count="0"/>
7999
- <line num="390" type="method" name="get_plugin_data" visibility="public" complexity="1" crap="2" count="0"/>
8000
- <line num="391" type="stmt" count="0"/>
8001
- <line num="392" type="stmt" count="0"/>
8002
- <line num="393" type="stmt" count="0"/>
8003
- <line num="409" type="method" name="get_upload_limit" visibility="public" complexity="1" crap="2" count="0"/>
8004
- <line num="412" type="stmt" count="0"/>
8005
- <line num="416" type="stmt" count="0"/>
 
8006
  <line num="419" type="stmt" count="0"/>
 
8007
  <line num="422" type="stmt" count="0"/>
8008
- <line num="439" type="method" name="bump_memory_limit" visibility="public" complexity="5" crap="5.20" count="9"/>
8009
- <line num="441" type="stmt" count="9"/>
8010
- <line num="442" type="stmt" count="0"/>
8011
- <line num="446" type="stmt" count="9"/>
8012
- <line num="449" type="stmt" count="9"/>
8013
- <line num="452" type="stmt" count="9"/>
8014
- <line num="456" type="stmt" count="9"/>
8015
- <line num="457" type="stmt" count="3"/>
8016
- <line num="458" type="stmt" count="0"/>
8017
- <line num="460" type="stmt" count="3"/>
8018
- <line num="462" type="stmt" count="9"/>
8019
- <line num="485" type="method" name="bump_upload_limit" visibility="public" complexity="4" crap="20" count="0"/>
8020
- <line num="487" type="stmt" count="0"/>
8021
  <line num="488" type="stmt" count="0"/>
8022
- <line num="493" type="stmt" count="0"/>
8023
- <line num="494" type="stmt" count="0"/>
8024
- <line num="499" type="stmt" count="0"/>
8025
- <line num="500" type="stmt" count="0"/>
8026
- <line num="504" type="stmt" count="0"/>
8027
- <line num="507" type="stmt" count="0"/>
8028
- <line num="509" type="stmt" count="0"/>
8029
- <line num="526" type="method" name="is_active" visibility="public" complexity="1" crap="1" count="29"/>
8030
- <line num="527" type="stmt" count="29"/>
8031
- <line num="529" type="stmt" count="29"/>
8032
- <line num="542" type="method" name="is_admin_page" visibility="public" complexity="3" crap="3" count="1"/>
8033
- <line num="543" type="stmt" count="1"/>
8034
- <line num="545" type="stmt" count="1"/>
8035
- <line num="560" type="method" name="is_zip_file" visibility="public" complexity="2" crap="6" count="0"/>
8036
- <line num="562" type="stmt" count="0"/>
 
8037
  <line num="563" type="stmt" count="0"/>
8038
- <line num="567" type="stmt" count="0"/>
 
8039
  <line num="570" type="stmt" count="0"/>
8040
- <line num="573" type="stmt" count="0"/>
8041
- <line num="576" type="stmt" count="0"/>
8042
  <line num="579" type="stmt" count="0"/>
8043
- <line num="596" type="method" name="zip_file_exists" visibility="public" complexity="5" crap="30" count="0"/>
8044
- <line num="598" type="stmt" count="0"/>
8045
- <line num="599" type="stmt" count="0"/>
8046
- <line num="603" type="stmt" count="0"/>
8047
- <line num="606" type="stmt" count="0"/>
8048
- <line num="608" type="stmt" count="0"/>
8049
- <line num="610" type="stmt" count="0"/>
8050
- <line num="614" type="stmt" count="0"/>
8051
- <line num="615" type="stmt" count="0"/>
8052
- <line num="616" type="stmt" count="0"/>
8053
- <line num="617" type="stmt" count="0"/>
8054
- <line num="621" type="stmt" count="0"/>
8055
- <line num="624" type="stmt" count="0"/>
8056
- <line num="641" type="method" name="chmod" visibility="public" complexity="1" crap="2" count="0"/>
8057
  <line num="643" type="stmt" count="0"/>
8058
  <line num="646" type="stmt" count="0"/>
8059
  <line num="649" type="stmt" count="0"/>
8060
- <line num="666" type="method" name="fix_wpconfig" visibility="public" complexity="5" crap="30" count="0"/>
8061
  <line num="668" type="stmt" count="0"/>
8062
- <line num="671" type="stmt" count="0"/>
8063
- <line num="674" type="stmt" count="0"/>
8064
- <line num="675" type="stmt" count="0"/>
8065
- <line num="679" type="stmt" count="0"/>
8066
- <line num="683" type="stmt" count="0"/>
8067
  <line num="684" type="stmt" count="0"/>
8068
  <line num="685" type="stmt" count="0"/>
8069
  <line num="686" type="stmt" count="0"/>
8070
  <line num="687" type="stmt" count="0"/>
8071
- <line num="688" type="stmt" count="0"/>
8072
- <line num="689" type="stmt" count="0"/>
8073
- <line num="690" type="stmt" count="0"/>
8074
  <line num="691" type="stmt" count="0"/>
8075
- <line num="692" type="stmt" count="0"/>
8076
- <line num="693" type="stmt" count="0"/>
8077
  <line num="694" type="stmt" count="0"/>
8078
- <line num="695" type="stmt" count="0"/>
8079
- <line num="698" type="stmt" count="0"/>
8080
- <line num="700" type="stmt" count="0"/>
8081
- <line num="701" type="stmt" count="0"/>
8082
- <line num="706" type="stmt" count="0"/>
8083
- <line num="709" type="stmt" count="0"/>
8084
- <line num="710" type="stmt" count="0"/>
8085
- <line num="711" type="stmt" count="0"/>
8086
- <line num="712" type="stmt" count="0"/>
8087
- <line num="714" type="stmt" count="0"/>
8088
- <line num="717" type="stmt" count="0"/>
8089
- <line num="718" type="stmt" count="0"/>
8090
- <line num="720" type="stmt" count="0"/>
8091
- <line num="723" type="stmt" count="0"/>
8092
- <line num="725" type="stmt" count="0"/>
8093
- <line num="742" type="method" name="update_siteurl" visibility="public" complexity="6" crap="42" count="0"/>
8094
  <line num="744" type="stmt" count="0"/>
8095
- <line num="747" type="stmt" count="0"/>
8096
- <line num="748" type="stmt" count="0"/>
8097
- <line num="752" type="stmt" count="0"/>
8098
  <line num="753" type="stmt" count="0"/>
 
 
 
8099
  <line num="757" type="stmt" count="0"/>
8100
  <line num="758" type="stmt" count="0"/>
 
 
8101
  <line num="761" type="stmt" count="0"/>
 
 
8102
  <line num="764" type="stmt" count="0"/>
8103
- <line num="767" type="stmt" count="0"/>
 
8104
  <line num="770" type="stmt" count="0"/>
8105
- <line num="775" type="stmt" count="0"/>
8106
  <line num="776" type="stmt" count="0"/>
8107
- <line num="777" type="stmt" count="0"/>
8108
  <line num="779" type="stmt" count="0"/>
8109
  <line num="780" type="stmt" count="0"/>
8110
  <line num="781" type="stmt" count="0"/>
8111
- <line num="783" type="stmt" count="0"/>
8112
  <line num="784" type="stmt" count="0"/>
8113
  <line num="787" type="stmt" count="0"/>
8114
- <line num="789" type="stmt" count="0"/>
8115
  <line num="790" type="stmt" count="0"/>
8116
- <line num="792" type="stmt" count="0"/>
8117
  <line num="793" type="stmt" count="0"/>
8118
- <line num="797" type="stmt" count="0"/>
8119
- <line num="798" type="stmt" count="0"/>
8120
- <line num="799" type="stmt" count="0"/>
8121
- <line num="801" type="stmt" count="0"/>
8122
- <line num="802" type="stmt" count="0"/>
8123
- <line num="803" type="stmt" count="0"/>
8124
- <line num="805" type="stmt" count="0"/>
8125
- <line num="807" type="stmt" count="0"/>
8126
- <line num="812" type="stmt" count="0"/>
8127
- <line num="813" type="stmt" count="0"/>
8128
  <line num="817" type="stmt" count="0"/>
8129
  <line num="818" type="stmt" count="0"/>
8130
- <line num="821" type="stmt" count="0"/>
8131
  <line num="822" type="stmt" count="0"/>
8132
  <line num="823" type="stmt" count="0"/>
8133
- <line num="825" type="stmt" count="0"/>
8134
  <line num="828" type="stmt" count="0"/>
8135
- <line num="829" type="stmt" count="0"/>
8136
- <line num="830" type="stmt" count="0"/>
8137
- <line num="832" type="stmt" count="0"/>
8138
  <line num="834" type="stmt" count="0"/>
8139
- <line num="835" type="stmt" count="0"/>
8140
  <line num="837" type="stmt" count="0"/>
8141
- <line num="852" type="method" name="str_replace_recursive" visibility="public" complexity="6" crap="42" count="0"/>
 
 
 
 
 
 
8142
  <line num="853" type="stmt" count="0"/>
8143
  <line num="854" type="stmt" count="0"/>
8144
- <line num="855" type="stmt" count="0"/>
8145
- <line num="856" type="stmt" count="0"/>
8146
- <line num="858" type="stmt" count="0"/>
8147
  <line num="859" type="stmt" count="0"/>
8148
  <line num="860" type="stmt" count="0"/>
8149
  <line num="862" type="stmt" count="0"/>
8150
  <line num="863" type="stmt" count="0"/>
8151
- <line num="864" type="stmt" count="0"/>
8152
- <line num="865" type="stmt" count="0"/>
8153
  <line num="867" type="stmt" count="0"/>
8154
  <line num="868" type="stmt" count="0"/>
8155
  <line num="869" type="stmt" count="0"/>
@@ -8157,20 +8179,55 @@
8157
  <line num="872" type="stmt" count="0"/>
8158
  <line num="873" type="stmt" count="0"/>
8159
  <line num="875" type="stmt" count="0"/>
8160
- <line num="886" type="method" name="time" visibility="public" complexity="3" crap="12" count="0"/>
 
 
8161
  <line num="887" type="stmt" count="0"/>
8162
- <line num="889" type="stmt" count="0"/>
8163
- <line num="890" type="stmt" count="0"/>
 
8164
  <line num="893" type="stmt" count="0"/>
8165
- <line num="909" type="method" name="trailingslashit" visibility="public" complexity="3" crap="3.71" count="14"/>
8166
- <line num="911" type="stmt" count="14"/>
8167
- <line num="912" type="stmt" count="14"/>
8168
- <line num="913" type="stmt" count="14"/>
8169
- <line num="914" type="stmt" count="0"/>
8170
- <line num="915" type="stmt" count="0"/>
8171
- <line num="916" type="stmt" count="0"/>
8172
- <line num="919" type="stmt" count="14"/>
8173
- <metrics loc="921" ncloc="422" classes="1" methods="22" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="300" coveredstatements="44" elements="322" coveredelements="47"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8174
  </file>
8175
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-wp-cron.php">
8176
  <class name="Boldgrid_Backup_Admin_WP_Cron" namespace="global" fullPackage="Boldgrid.Backup.Admin.WP">
@@ -14236,36 +14293,37 @@
14236
  <line num="62" type="stmt" count="0"/>
14237
  <line num="63" type="stmt" count="0"/>
14238
  <line num="64" type="stmt" count="0"/>
14239
- <line num="66" type="stmt" count="0"/>
14240
  <line num="67" type="stmt" count="0"/>
14241
  <line num="68" type="stmt" count="0"/>
14242
  <line num="69" type="stmt" count="0"/>
14243
  <line num="70" type="stmt" count="0"/>
14244
- <line num="73" type="stmt" count="0"/>
14245
  <line num="74" type="stmt" count="0"/>
14246
  <line num="75" type="stmt" count="0"/>
14247
  <line num="76" type="stmt" count="0"/>
14248
  <line num="77" type="stmt" count="0"/>
14249
  <line num="78" type="stmt" count="0"/>
14250
- <line num="80" type="stmt" count="0"/>
14251
  <line num="81" type="stmt" count="0"/>
14252
  <line num="82" type="stmt" count="0"/>
14253
- <line num="84" type="stmt" count="0"/>
14254
  <line num="85" type="stmt" count="0"/>
14255
  <line num="86" type="stmt" count="0"/>
14256
- <line num="88" type="stmt" count="0"/>
14257
- <line num="91" type="stmt" count="0"/>
14258
  <line num="92" type="stmt" count="0"/>
14259
  <line num="93" type="stmt" count="0"/>
14260
- <line num="95" type="stmt" count="0"/>
14261
  <line num="96" type="stmt" count="0"/>
14262
  <line num="97" type="stmt" count="0"/>
14263
  <line num="98" type="stmt" count="0"/>
14264
  <line num="99" type="stmt" count="0"/>
14265
  <line num="100" type="stmt" count="0"/>
14266
  <line num="101" type="stmt" count="0"/>
14267
- <line num="103" type="stmt" count="0"/>
14268
- <metrics loc="103" ncloc="72" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="61" coveredstatements="0" elements="61" coveredelements="0"/>
 
14269
  </file>
14270
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/boldgrid-backup.php">
14271
  <line num="29" type="stmt" count="0"/>
@@ -15532,92 +15590,65 @@
15532
  </file>
15533
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-archive-fetcher.php">
15534
  <class name="Boldgrid_Backup_Archive_Fetcher" namespace="global" fullPackage="Boldgrid.Backup.Archive">
15535
- <metrics complexity="17" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="73" coveredstatements="0" elements="83" coveredelements="0"/>
15536
  </class>
15537
- <line num="115" type="method" name="__construct" visibility="public" complexity="1" crap="2" count="0"/>
15538
- <line num="116" type="stmt" count="0"/>
 
 
 
 
15539
  <line num="118" type="stmt" count="0"/>
15540
- <line num="119" type="stmt" count="0"/>
15541
- <line num="128" type="method" name="download" visibility="public" complexity="4" crap="20" count="0"/>
15542
- <line num="129" type="stmt" count="0"/>
 
 
 
 
 
15543
  <line num="130" type="stmt" count="0"/>
15544
  <line num="131" type="stmt" count="0"/>
15545
  <line num="132" type="stmt" count="0"/>
15546
- <line num="134" type="stmt" count="0"/>
15547
- <line num="135" type="stmt" count="0"/>
15548
- <line num="136" type="stmt" count="0"/>
15549
- <line num="137" type="stmt" count="0"/>
15550
- <line num="139" type="stmt" count="0"/>
15551
- <line num="141" type="stmt" count="0"/>
15552
  <line num="142" type="stmt" count="0"/>
15553
  <line num="143" type="stmt" count="0"/>
15554
- <line num="144" type="stmt" count="0"/>
15555
- <line num="145" type="stmt" count="0"/>
15556
- <line num="146" type="stmt" count="0"/>
15557
- <line num="147" type="stmt" count="0"/>
15558
- <line num="148" type="stmt" count="0"/>
15559
- <line num="149" type="stmt" count="0"/>
15560
- <line num="150" type="stmt" count="0"/>
15561
- <line num="152" type="stmt" count="0"/>
15562
  <line num="153" type="stmt" count="0"/>
15563
- <line num="155" type="stmt" count="0"/>
15564
- <line num="156" type="stmt" count="0"/>
15565
- <line num="157" type="stmt" count="0"/>
15566
- <line num="159" type="stmt" count="0"/>
15567
- <line num="160" type="stmt" count="0"/>
15568
- <line num="161" type="stmt" count="0"/>
15569
- <line num="162" type="stmt" count="0"/>
15570
  <line num="164" type="stmt" count="0"/>
15571
  <line num="165" type="stmt" count="0"/>
15572
- <line num="166" type="stmt" count="0"/>
15573
- <line num="175" type="method" name="get_error" visibility="public" complexity="1" crap="2" count="0"/>
15574
- <line num="176" type="stmt" count="0"/>
15575
  <line num="177" type="stmt" count="0"/>
15576
- <line num="186" type="method" name="get_info" visibility="public" complexity="1" crap="2" count="0"/>
15577
- <line num="187" type="stmt" count="0"/>
 
15578
  <line num="188" type="stmt" count="0"/>
15579
- <line num="197" type="method" name="has_error" visibility="public" complexity="1" crap="2" count="0"/>
15580
- <line num="198" type="stmt" count="0"/>
 
15581
  <line num="199" type="stmt" count="0"/>
15582
- <line num="211" type="method" name="is_call_successful" visibility="private" complexity="3" crap="12" count="0"/>
15583
- <line num="212" type="stmt" count="0"/>
 
 
 
 
 
15584
  <line num="213" type="stmt" count="0"/>
15585
- <line num="214" type="stmt" count="0"/>
15586
  <line num="215" type="stmt" count="0"/>
15587
- <line num="224" type="method" name="is_valid_backupdir" visibility="private" complexity="2" crap="6" count="0"/>
 
 
 
 
 
 
15588
  <line num="225" type="stmt" count="0"/>
15589
- <line num="227" type="stmt" count="0"/>
15590
- <line num="228" type="stmt" count="0"/>
15591
- <line num="237" type="method" name="is_valid_url" visibility="private" complexity="1" crap="2" count="0"/>
15592
- <line num="238" type="stmt" count="0"/>
15593
- <line num="240" type="stmt" count="0"/>
15594
- <line num="241" type="stmt" count="0"/>
15595
- <line num="248" type="method" name="post_successful_download" visibility="private" complexity="1" crap="2" count="0"/>
15596
- <line num="249" type="stmt" count="0"/>
15597
- <line num="251" type="stmt" count="0"/>
15598
- <line num="254" type="stmt" count="0"/>
15599
- <line num="257" type="stmt" count="0"/>
15600
- <line num="260" type="stmt" count="0"/>
15601
- <line num="262" type="stmt" count="0"/>
15602
- <line num="263" type="stmt" count="0"/>
15603
- <line num="264" type="stmt" count="0"/>
15604
- <line num="265" type="stmt" count="0"/>
15605
- <line num="266" type="stmt" count="0"/>
15606
- <line num="267" type="stmt" count="0"/>
15607
- <line num="268" type="stmt" count="0"/>
15608
- <line num="275" type="method" name="set_logfilepath" visibility="private" complexity="2" crap="6" count="0"/>
15609
- <line num="276" type="stmt" count="0"/>
15610
- <line num="278" type="stmt" count="0"/>
15611
- <line num="279" type="stmt" count="0"/>
15612
- <line num="280" type="stmt" count="0"/>
15613
- <line num="281" type="stmt" count="0"/>
15614
- <line num="282" type="stmt" count="0"/>
15615
- <line num="283" type="stmt" count="0"/>
15616
- <line num="285" type="stmt" count="0"/>
15617
- <line num="286" type="stmt" count="0"/>
15618
- <line num="288" type="stmt" count="0"/>
15619
- <line num="289" type="stmt" count="0"/>
15620
- <metrics loc="290" ncloc="131" classes="1" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="73" coveredstatements="0" elements="83" coveredelements="0"/>
15621
  </file>
15622
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-archiver.php">
15623
  <class name="Boldgrid_Backup_Archiver" namespace="global" fullPackage="Boldgrid.Backup">
@@ -15832,7 +15863,7 @@
15832
  </file>
15833
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-download.php">
15834
  <class name="Boldgrid_Backup_Download" namespace="global" fullPackage="Boldgrid.Backup">
15835
- <metrics complexity="5" methods="2" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="12" coveredstatements="2" elements="14" coveredelements="3"/>
15836
  </class>
15837
  <line num="37" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="29"/>
15838
  <line num="38" type="stmt" count="29"/>
@@ -15843,12 +15874,30 @@
15843
  <line num="56" type="stmt" count="0"/>
15844
  <line num="57" type="stmt" count="0"/>
15845
  <line num="59" type="stmt" count="0"/>
 
15846
  <line num="61" type="stmt" count="0"/>
15847
- <line num="62" type="stmt" count="0"/>
15848
  <line num="63" type="stmt" count="0"/>
15849
  <line num="65" type="stmt" count="0"/>
15850
- <line num="66" type="stmt" count="0"/>
15851
- <metrics loc="67" ncloc="21" classes="1" methods="2" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="12" coveredstatements="2" elements="14" coveredelements="3"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15852
  </file>
15853
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
15854
  <class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
@@ -16136,7 +16185,7 @@
16136
  </file>
16137
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup.php">
16138
  <class name="Boldgrid_Backup" namespace="global" fullPackage="Boldgrid">
16139
- <metrics complexity="19" methods="9" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="317" coveredstatements="0" elements="326" coveredelements="0"/>
16140
  </class>
16141
  <line num="66" type="method" name="__construct" visibility="public" complexity="2" crap="6" count="0"/>
16142
  <line num="67" type="stmt" count="0"/>
@@ -16150,6 +16199,8 @@
16150
  <line num="97" type="stmt" count="0"/>
16151
  <line num="103" type="stmt" count="0"/>
16152
  <line num="108" type="stmt" count="0"/>
 
 
16153
  <line num="113" type="stmt" count="0"/>
16154
  <line num="118" type="stmt" count="0"/>
16155
  <line num="123" type="stmt" count="0"/>
@@ -16302,190 +16353,200 @@
16302
  <line num="372" type="stmt" count="0"/>
16303
  <line num="373" type="stmt" count="0"/>
16304
  <line num="374" type="stmt" count="0"/>
16305
- <line num="376" type="stmt" count="0"/>
16306
- <line num="377" type="stmt" count="0"/>
16307
- <line num="388" type="method" name="set_locale" visibility="private" complexity="1" crap="2" count="0"/>
16308
- <line num="389" type="stmt" count="0"/>
16309
- <line num="391" type="stmt" count="0"/>
16310
- <line num="392" type="stmt" count="0"/>
16311
- <line num="400" type="method" name="define_admin_hooks" visibility="private" complexity="7" crap="56" count="0"/>
 
 
 
 
 
 
16312
  <line num="402" type="stmt" count="0"/>
16313
- <line num="404" type="stmt" count="0"/>
16314
- <line num="407" type="stmt" count="0"/>
16315
- <line num="408" type="stmt" count="0"/>
16316
- <line num="409" type="stmt" count="0"/>
16317
  <line num="412" type="stmt" count="0"/>
16318
- <line num="413" type="stmt" count="0"/>
16319
  <line num="414" type="stmt" count="0"/>
16320
- <line num="416" type="stmt" count="0"/>
16321
  <line num="417" type="stmt" count="0"/>
16322
  <line num="418" type="stmt" count="0"/>
16323
- <line num="421" type="stmt" count="0"/>
16324
- <line num="422" type="stmt" count="0"/>
16325
  <line num="423" type="stmt" count="0"/>
16326
  <line num="424" type="stmt" count="0"/>
 
16327
  <line num="427" type="stmt" count="0"/>
16328
  <line num="428" type="stmt" count="0"/>
16329
  <line num="429" type="stmt" count="0"/>
16330
- <line num="430" type="stmt" count="0"/>
16331
  <line num="432" type="stmt" count="0"/>
16332
  <line num="433" type="stmt" count="0"/>
16333
  <line num="434" type="stmt" count="0"/>
16334
  <line num="435" type="stmt" count="0"/>
16335
- <line num="436" type="stmt" count="0"/>
16336
  <line num="439" type="stmt" count="0"/>
16337
  <line num="440" type="stmt" count="0"/>
16338
  <line num="441" type="stmt" count="0"/>
16339
- <line num="442" type="stmt" count="0"/>
 
16340
  <line num="445" type="stmt" count="0"/>
16341
  <line num="446" type="stmt" count="0"/>
16342
  <line num="447" type="stmt" count="0"/>
16343
- <line num="448" type="stmt" count="0"/>
16344
  <line num="451" type="stmt" count="0"/>
16345
  <line num="452" type="stmt" count="0"/>
16346
  <line num="453" type="stmt" count="0"/>
16347
- <line num="454" type="stmt" count="0"/>
16348
  <line num="457" type="stmt" count="0"/>
16349
  <line num="458" type="stmt" count="0"/>
16350
  <line num="459" type="stmt" count="0"/>
16351
- <line num="460" type="stmt" count="0"/>
16352
  <line num="463" type="stmt" count="0"/>
16353
  <line num="464" type="stmt" count="0"/>
16354
  <line num="465" type="stmt" count="0"/>
16355
- <line num="466" type="stmt" count="0"/>
16356
  <line num="469" type="stmt" count="0"/>
16357
  <line num="470" type="stmt" count="0"/>
16358
  <line num="471" type="stmt" count="0"/>
16359
- <line num="472" type="stmt" count="0"/>
16360
  <line num="474" type="stmt" count="0"/>
16361
  <line num="475" type="stmt" count="0"/>
16362
  <line num="476" type="stmt" count="0"/>
16363
- <line num="479" type="stmt" count="0"/>
16364
  <line num="480" type="stmt" count="0"/>
16365
  <line num="481" type="stmt" count="0"/>
16366
  <line num="482" type="stmt" count="0"/>
 
16367
  <line num="485" type="stmt" count="0"/>
16368
  <line num="486" type="stmt" count="0"/>
16369
  <line num="487" type="stmt" count="0"/>
16370
- <line num="488" type="stmt" count="0"/>
16371
  <line num="490" type="stmt" count="0"/>
16372
  <line num="491" type="stmt" count="0"/>
16373
  <line num="492" type="stmt" count="0"/>
16374
  <line num="493" type="stmt" count="0"/>
16375
- <line num="494" type="stmt" count="0"/>
16376
- <line num="495" type="stmt" count="0"/>
16377
  <line num="497" type="stmt" count="0"/>
 
16378
  <line num="499" type="stmt" count="0"/>
16379
  <line num="501" type="stmt" count="0"/>
 
16380
  <line num="503" type="stmt" count="0"/>
16381
  <line num="504" type="stmt" count="0"/>
16382
  <line num="505" type="stmt" count="0"/>
16383
- <line num="507" type="stmt" count="0"/>
16384
  <line num="508" type="stmt" count="0"/>
16385
  <line num="510" type="stmt" count="0"/>
16386
  <line num="512" type="stmt" count="0"/>
16387
  <line num="514" type="stmt" count="0"/>
 
16388
  <line num="516" type="stmt" count="0"/>
16389
  <line num="518" type="stmt" count="0"/>
16390
  <line num="519" type="stmt" count="0"/>
16391
- <line num="520" type="stmt" count="0"/>
16392
- <line num="522" type="stmt" count="0"/>
16393
- <line num="524" type="stmt" count="0"/>
16394
  <line num="525" type="stmt" count="0"/>
16395
- <line num="526" type="stmt" count="0"/>
16396
  <line num="527" type="stmt" count="0"/>
16397
  <line num="529" type="stmt" count="0"/>
 
16398
  <line num="531" type="stmt" count="0"/>
16399
  <line num="533" type="stmt" count="0"/>
16400
  <line num="535" type="stmt" count="0"/>
 
16401
  <line num="537" type="stmt" count="0"/>
16402
- <line num="539" type="stmt" count="0"/>
 
 
16403
  <line num="544" type="stmt" count="0"/>
16404
  <line num="546" type="stmt" count="0"/>
16405
  <line num="548" type="stmt" count="0"/>
16406
  <line num="550" type="stmt" count="0"/>
16407
- <line num="552" type="stmt" count="0"/>
16408
- <line num="554" type="stmt" count="0"/>
16409
- <line num="556" type="stmt" count="0"/>
16410
- <line num="558" type="stmt" count="0"/>
16411
  <line num="559" type="stmt" count="0"/>
16412
  <line num="561" type="stmt" count="0"/>
16413
- <line num="562" type="stmt" count="0"/>
16414
- <line num="564" type="stmt" count="0"/>
16415
- <line num="566" type="stmt" count="0"/>
16416
  <line num="567" type="stmt" count="0"/>
16417
- <line num="568" type="stmt" count="0"/>
16418
  <line num="570" type="stmt" count="0"/>
16419
  <line num="572" type="stmt" count="0"/>
16420
  <line num="573" type="stmt" count="0"/>
16421
- <line num="576" type="stmt" count="0"/>
16422
  <line num="577" type="stmt" count="0"/>
16423
  <line num="578" type="stmt" count="0"/>
16424
  <line num="579" type="stmt" count="0"/>
16425
- <line num="580" type="stmt" count="0"/>
16426
  <line num="583" type="stmt" count="0"/>
16427
  <line num="584" type="stmt" count="0"/>
16428
  <line num="587" type="stmt" count="0"/>
 
 
16429
  <line num="590" type="stmt" count="0"/>
16430
- <line num="593" type="stmt" count="0"/>
 
 
16431
  <line num="596" type="stmt" count="0"/>
16432
- <line num="598" type="stmt" count="0"/>
16433
- <line num="600" type="stmt" count="0"/>
16434
  <line num="602" type="stmt" count="0"/>
16435
- <line num="604" type="stmt" count="0"/>
16436
- <line num="607" type="stmt" count="0"/>
16437
  <line num="608" type="stmt" count="0"/>
16438
- <line num="609" type="stmt" count="0"/>
16439
  <line num="610" type="stmt" count="0"/>
16440
- <line num="611" type="stmt" count="0"/>
16441
  <line num="612" type="stmt" count="0"/>
16442
- <line num="615" type="stmt" count="0"/>
16443
- <line num="618" type="stmt" count="0"/>
16444
  <line num="619" type="stmt" count="0"/>
16445
- <line num="622" type="method" name="anonymous function" complexity="1" crap="2" count="0"/>
 
 
16446
  <line num="623" type="stmt" count="0"/>
16447
  <line num="624" type="stmt" count="0"/>
16448
- <line num="626" type="stmt" count="0"/>
16449
  <line num="627" type="stmt" count="0"/>
16450
- <line num="629" type="stmt" count="0"/>
16451
  <line num="630" type="stmt" count="0"/>
16452
- <line num="632" type="stmt" count="0"/>
16453
- <line num="633" type="stmt" count="0"/>
16454
- <line num="634" type="stmt" count="0"/>
16455
  <line num="636" type="stmt" count="0"/>
16456
  <line num="638" type="stmt" count="0"/>
16457
  <line num="639" type="stmt" count="0"/>
16458
- <line num="640" type="stmt" count="0"/>
16459
  <line num="641" type="stmt" count="0"/>
16460
  <line num="642" type="stmt" count="0"/>
16461
- <line num="643" type="stmt" count="0"/>
 
16462
  <line num="646" type="stmt" count="0"/>
16463
- <line num="647" type="stmt" count="0"/>
16464
  <line num="648" type="stmt" count="0"/>
 
16465
  <line num="651" type="stmt" count="0"/>
 
 
 
 
16466
  <line num="658" type="stmt" count="0"/>
16467
  <line num="659" type="stmt" count="0"/>
16468
  <line num="660" type="stmt" count="0"/>
16469
- <line num="662" type="stmt" count="0"/>
16470
  <line num="663" type="stmt" count="0"/>
16471
- <line num="665" type="stmt" count="0"/>
 
16472
  <line num="672" type="stmt" count="0"/>
16473
- <line num="673" type="stmt" count="0"/>
16474
  <line num="674" type="stmt" count="0"/>
16475
  <line num="675" type="stmt" count="0"/>
16476
- <line num="682" type="method" name="run" visibility="public" complexity="1" crap="2" count="0"/>
16477
- <line num="683" type="stmt" count="0"/>
16478
  <line num="684" type="stmt" count="0"/>
16479
- <line num="693" type="method" name="get_plugin_name" visibility="public" complexity="1" crap="2" count="0"/>
16480
- <line num="694" type="stmt" count="0"/>
 
 
16481
  <line num="695" type="stmt" count="0"/>
16482
- <line num="703" type="method" name="get_loader" visibility="public" complexity="1" crap="2" count="0"/>
16483
- <line num="704" type="stmt" count="0"/>
16484
- <line num="705" type="stmt" count="0"/>
16485
- <line num="713" type="method" name="get_version" visibility="public" complexity="1" crap="2" count="0"/>
16486
- <line num="714" type="stmt" count="0"/>
16487
- <line num="715" type="stmt" count="0"/>
16488
- <metrics loc="716" ncloc="446" classes="1" methods="9" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="338" coveredstatements="0" elements="347" coveredelements="0"/>
 
 
 
 
16489
  </file>
16490
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/config/config.cron.php">
16491
  <line num="17" type="stmt" count="1"/>
@@ -16511,11 +16572,16 @@
16511
  <line num="62" type="stmt" count="1"/>
16512
  <line num="64" type="stmt" count="1"/>
16513
  <line num="65" type="stmt" count="1"/>
16514
- <line num="66" type="stmt" count="1"/>
16515
- <line num="67" type="stmt" count="1"/>
16516
  <line num="69" type="stmt" count="1"/>
 
16517
  <line num="71" type="stmt" count="1"/>
16518
- <metrics loc="71" ncloc="43" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="27" coveredstatements="24" elements="27" coveredelements="24"/>
 
 
 
 
 
 
16519
  </file>
16520
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/config/config.plugin.php">
16521
  <line num="17" type="stmt" count="1"/>
@@ -16809,52 +16875,139 @@
16809
  <metrics loc="185" ncloc="118" classes="1" methods="5" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="75" coveredstatements="39" elements="80" coveredelements="42"/>
16810
  </file>
16811
  </package>
16812
- <package name="Boldgrid\Backup\V2\Archive">
16813
- <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-archive.php">
16814
- <class name="Archive" namespace="Boldgrid\Backup\V2\Archive">
16815
- <metrics complexity="7" methods="6" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="9" elements="19" coveredelements="11"/>
16816
  </class>
16817
- <line num="44" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="4"/>
16818
- <line num="45" type="stmt" count="4"/>
16819
- <line num="46" type="stmt" count="4"/>
16820
- <line num="51" type="method" name="get_dir" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
 
 
 
 
 
 
 
 
16821
  <line num="52" type="stmt" count="0"/>
16822
- <line num="58" type="method" name="get_dirlist" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
16823
  <line num="59" type="stmt" count="0"/>
16824
- <line num="65" type="method" name="get_id" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
 
16825
  <line num="66" type="stmt" count="0"/>
16826
- <line num="72" type="method" name="set_dir" visibility="public" complexity="1" crap="1" count="4"/>
16827
- <line num="73" type="stmt" count="4"/>
16828
- <line num="74" type="stmt" count="4"/>
16829
- <line num="79" type="method" name="set_filename" visibility="public" complexity="2" crap="2.02" count="4"/>
16830
- <line num="81" type="stmt" count="4"/>
16831
- <line num="82" type="stmt" count="4"/>
16832
- <line num="83" type="stmt" count="0"/>
16833
- <line num="85" type="stmt" count="4"/>
16834
- <line num="87" type="stmt" count="4"/>
16835
- <line num="88" type="stmt" count="4"/>
16836
- <metrics loc="89" ncloc="42" classes="1" methods="6" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="9" elements="19" coveredelements="11"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16837
  </file>
16838
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-dirlist.php">
16839
  <class name="Dirlist" namespace="Boldgrid\Backup\V2\Archive">
16840
- <metrics complexity="5" methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="12" coveredstatements="3" elements="15" coveredelements="4"/>
16841
  </class>
16842
  <line num="33" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="4"/>
16843
  <line num="34" type="stmt" count="4"/>
16844
  <line num="35" type="stmt" count="4"/>
16845
  <line num="36" type="stmt" count="4"/>
16846
- <line num="41" type="method" name="get" visibility="public" complexity="1" crap="2" count="0"/>
16847
  <line num="42" type="stmt" count="0"/>
16848
- <line num="45" type="method" name="get_by_extension" visibility="public" complexity="3" crap="12" count="0"/>
16849
  <line num="46" type="stmt" count="0"/>
 
16850
  <line num="48" type="stmt" count="0"/>
16851
- <line num="49" type="stmt" count="0"/>
16852
  <line num="50" type="stmt" count="0"/>
16853
- <line num="51" type="stmt" count="0"/>
16854
- <line num="52" type="stmt" count="0"/>
16855
- <line num="53" type="stmt" count="0"/>
16856
- <line num="55" type="stmt" count="0"/>
16857
- <metrics loc="57" ncloc="31" classes="1" methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="12" coveredstatements="3" elements="15" coveredelements="4"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16858
  </file>
16859
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-factory.php">
16860
  <class name="Factory" namespace="Boldgrid\Backup\V2\Archive">
@@ -16873,6 +17026,22 @@
16873
  <line num="43" type="stmt" count="4"/>
16874
  <metrics loc="45" ncloc="22" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="8" elements="11" coveredelements="8"/>
16875
  </file>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16876
  </package>
16877
  <package name="Boldgrid\Backup\V2\Archiver">
16878
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archiver/class-archiver.php">
@@ -17269,6 +17438,243 @@
17269
  <metrics loc="77" ncloc="44" classes="1" methods="3" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="22" coveredstatements="22" elements="25" coveredelements="25"/>
17270
  </file>
17271
  </package>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17272
  <package name="Boldgrid\Backup\V2\Filelist">
17273
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/filelist/class-create.php">
17274
  <class name="Create" namespace="Boldgrid\Backup\V2\Filelist">
@@ -17538,124 +17944,152 @@
17538
  </file>
17539
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/step/class-step.php">
17540
  <class name="Step" namespace="Boldgrid\Backup\V2\Step">
17541
- <metrics complexity="36" methods="23" coveredmethods="19" conditionals="0" coveredconditionals="0" statements="92" coveredstatements="79" elements="115" coveredelements="98"/>
17542
  </class>
17543
- <line num="114" type="method" name="__construct" visibility="public" complexity="2" crap="2" count="1"/>
17544
- <line num="115" type="stmt" count="1"/>
17545
  <line num="117" type="stmt" count="1"/>
17546
- <line num="118" type="stmt" count="1"/>
17547
  <line num="119" type="stmt" count="1"/>
 
17548
  <line num="121" type="stmt" count="1"/>
17549
- <line num="122" type="stmt" count="1"/>
17550
  <line num="123" type="stmt" count="1"/>
17551
- <line num="124" type="stmt" count="1"/>
17552
  <line num="125" type="stmt" count="1"/>
17553
- <line num="127" type="stmt" count="1"/>
17554
  <line num="128" type="stmt" count="1"/>
17555
- <line num="130" type="stmt" count="1"/>
17556
- <line num="132" type="stmt" count="1"/>
17557
- <line num="133" type="stmt" count="1"/>
17558
- <line num="140" type="method" name="add_attempt" visibility="public" complexity="1" crap="1" count="1"/>
17559
- <line num="141" type="stmt" count="1"/>
17560
  <line num="142" type="stmt" count="1"/>
 
17561
  <line num="144" type="stmt" count="1"/>
 
17562
  <line num="146" type="stmt" count="1"/>
17563
- <line num="147" type="stmt" count="1"/>
17564
- <line num="148" type="stmt" count="1"/>
17565
- <line num="149" type="stmt" count="1"/>
17566
- <line num="150" type="stmt" count="1"/>
17567
- <line num="159" type="method" name="check_in" visibility="public" complexity="2" crap="2" count="1"/>
17568
  <line num="160" type="stmt" count="1"/>
 
 
17569
  <line num="163" type="stmt" count="1"/>
17570
- <line num="164" type="stmt" count="1"/>
17571
- <line num="165" type="stmt" count="1"/>
17572
- <line num="166" type="stmt" count="1"/>
17573
- <line num="167" type="stmt" count="1"/>
17574
- <line num="174" type="method" name="complete" visibility="public" complexity="1" crap="1" count="1"/>
17575
  <line num="175" type="stmt" count="1"/>
17576
- <line num="176" type="stmt" count="1"/>
17577
  <line num="178" type="stmt" count="1"/>
17578
- <line num="179" type="stmt" count="1"/>
17579
  <line num="181" type="stmt" count="1"/>
17580
- <line num="182" type="stmt" count="1"/>
17581
  <line num="184" type="stmt" count="1"/>
17582
- <line num="185" type="stmt" count="1"/>
17583
- <line num="187" type="stmt" count="1"/>
17584
- <line num="188" type="stmt" count="1"/>
17585
- <line num="193" type="method" name="fail" visibility="public" complexity="1" crap="2" count="0"/>
17586
- <line num="194" type="stmt" count="0"/>
17587
  <line num="195" type="stmt" count="0"/>
17588
  <line num="197" type="stmt" count="0"/>
17589
- <line num="199" type="stmt" count="0"/>
17590
- <line num="201" type="stmt" count="0"/>
17591
- <line num="202" type="stmt" count="0"/>
17592
- <line num="211" type="method" name="get_core" visibility="public" complexity="1" crap="1" count="1"/>
17593
- <line num="212" type="stmt" count="1"/>
17594
- <line num="222" type="method" name="get_contents" visibility="public" complexity="3" crap="3" count="1"/>
 
17595
  <line num="223" type="stmt" count="1"/>
 
17596
  <line num="225" type="stmt" count="1"/>
17597
- <line num="226" type="stmt" count="1"/>
17598
  <line num="227" type="stmt" count="1"/>
17599
- <line num="228" type="stmt" count="1"/>
17600
- <line num="229" type="stmt" count="1"/>
17601
- <line num="231" type="stmt" count="1"/>
17602
- <line num="244" type="method" name="get_data_type" visibility="public" complexity="1" crap="1" count="1"/>
17603
- <line num="245" type="stmt" count="1"/>
17604
- <line num="255" type="method" name="get_dir" visibility="public" complexity="1" crap="1" count="1"/>
17605
- <line num="256" type="stmt" count="1"/>
17606
- <line num="262" type="method" name="get_info" visibility="public" complexity="1" crap="1" count="1"/>
17607
- <line num="263" type="stmt" count="1"/>
17608
- <line num="269" type="method" name="get_parent" visibility="public" complexity="1" crap="1" count="1"/>
17609
- <line num="270" type="stmt" count="1"/>
17610
- <line num="281" type="method" name="get_path_to" visibility="public" complexity="1" crap="1" count="1"/>
17611
- <line num="282" type="stmt" count="1"/>
17612
- <line num="288" type="method" name="get_this" visibility="public" complexity="1" crap="1" count="1"/>
17613
- <line num="289" type="stmt" count="1"/>
17614
- <line num="295" type="method" name="get_step" visibility="public" complexity="1" crap="1" count="1"/>
17615
- <line num="296" type="stmt" count="1"/>
17616
- <line num="306" type="method" name="is_complete" visibility="public" complexity="1" crap="1" count="1"/>
17617
- <line num="307" type="stmt" count="1"/>
17618
- <line num="309" type="stmt" count="1"/>
17619
- <line num="319" type="method" name="is_fail" visibility="public" complexity="1" crap="1" count="1"/>
17620
- <line num="320" type="stmt" count="1"/>
17621
- <line num="322" type="stmt" count="1"/>
17622
- <line num="332" type="method" name="is_in_progress" visibility="public" complexity="2" crap="2" count="1"/>
17623
- <line num="333" type="stmt" count="1"/>
17624
  <line num="336" type="stmt" count="1"/>
17625
- <line num="346" type="method" name="is_max_attemps" visibility="public" complexity="1" crap="1" count="1"/>
17626
- <line num="347" type="stmt" count="1"/>
17627
- <line num="357" type="method" name="is_unresponsive" visibility="public" complexity="2" crap="6" count="0"/>
17628
- <line num="358" type="stmt" count="0"/>
17629
- <line num="360" type="stmt" count="0"/>
17630
- <line num="366" type="method" name="log" visibility="public" complexity="3" crap="3.01" count="1"/>
17631
- <line num="367" type="stmt" count="1"/>
17632
- <line num="368" type="stmt" count="1"/>
17633
  <line num="370" type="stmt" count="1"/>
17634
- <line num="371" type="stmt" count="0"/>
17635
- <line num="374" type="stmt" count="1"/>
17636
- <line num="375" type="stmt" count="1"/>
17637
- <line num="376" type="stmt" count="1"/>
17638
  <line num="378" type="stmt" count="1"/>
17639
  <line num="379" type="stmt" count="1"/>
17640
- <line num="388" type="method" name="maybe_run" visibility="public" complexity="6" crap="9.16" count="1"/>
17641
- <line num="390" type="stmt" count="1"/>
17642
- <line num="391" type="stmt" count="0"/>
17643
- <line num="394" type="stmt" count="1"/>
17644
- <line num="395" type="stmt" count="0"/>
17645
- <line num="398" type="stmt" count="1"/>
17646
  <line num="399" type="stmt" count="0"/>
17647
- <line num="402" type="stmt" count="1"/>
17648
  <line num="403" type="stmt" count="0"/>
17649
- <line num="406" type="stmt" count="1"/>
17650
- <line num="418" type="method" name="write_contents" visibility="public" complexity="1" crap="1" count="1"/>
17651
- <line num="419" type="stmt" count="1"/>
 
 
 
17652
  <line num="421" type="stmt" count="1"/>
17653
- <line num="432" type="method" name="write_key" visibility="public" complexity="1" crap="1" count="1"/>
 
 
 
 
17654
  <line num="433" type="stmt" count="1"/>
17655
- <line num="434" type="stmt" count="1"/>
17656
- <line num="438" type="stmt" count="1"/>
17657
- <line num="441" type="stmt" count="1"/>
17658
- <metrics loc="442" ncloc="211" classes="1" methods="23" coveredmethods="19" conditionals="0" coveredconditionals="0" statements="92" coveredstatements="79" elements="115" coveredelements="98"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17659
  </file>
17660
  </package>
17661
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/index.php">
@@ -74489,12 +74923,12 @@
74489
  <metrics loc="135" ncloc="76" classes="1" methods="4" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="51" coveredstatements="51" elements="55" coveredelements="55"/>
74490
  </file>
74491
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/tests/bootstrap.php">
74492
- <line num="179" type="stmt" count="0"/>
74493
- <line num="180" type="stmt" count="0"/>
74494
  <line num="182" type="stmt" count="0"/>
74495
  <line num="184" type="stmt" count="0"/>
74496
- <line num="185" type="stmt" count="0"/>
74497
- <metrics loc="187" ncloc="137" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="5" coveredelements="0"/>
 
74498
  </file>
74499
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/tests/cli/test-class-info.php">
74500
  <class name="Test_Boldgrid_Backup_Cli_Info" namespace="global" fullPackage="Test.Boldgrid.Backup.Cli">
@@ -79228,7 +79662,7 @@
79228
  <metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
79229
  </file>
79230
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
79231
- <class name="ComposerStaticInitb1f5af037fce92093b4769cf19c0b864" namespace="Composer\Autoload">
79232
  <metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
79233
  </class>
79234
  <line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
@@ -79320,7 +79754,7 @@
79320
  <metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
79321
  </file>
79322
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
79323
- <class name="ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864" namespace="global">
79324
  <metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
79325
  </class>
79326
  <line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
@@ -98565,6 +98999,6 @@
98565
  <line num="16" type="stmt" count="0"/>
98566
  <metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
98567
  </file>
98568
- <metrics files="1007" loc="199682" ncloc="121036" classes="913" methods="3830" coveredmethods="440" conditionals="0" coveredconditionals="0" statements="88536" coveredstatements="5551" elements="92366" coveredelements="5991"/>
98569
  </project>
98570
  </coverage>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <coverage generated="1612281286">
3
+ <project timestamp="1612281286">
4
  <package name="Boldgrid\Backup\Admin\Card">
5
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
6
  <class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
1160
  </file>
1161
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-archive.php">
1162
  <class name="Boldgrid_Backup_Admin_Archive" namespace="global" fullPackage="Boldgrid.Backup.Admin">
1163
+ <metrics complexity="81" methods="26" coveredmethods="15" conditionals="0" coveredconditionals="0" statements="228" coveredstatements="110" elements="254" coveredelements="125"/>
1164
  </class>
1165
  <line num="174" type="method" name="__construct" visibility="public" complexity="2" crap="2" count="41"/>
1166
  <line num="175" type="stmt" count="41"/>
1168
  <line num="177" type="stmt" count="12"/>
1169
  <line num="179" type="stmt" count="41"/>
1170
  <line num="180" type="stmt" count="41"/>
1171
+ <line num="190" type="method" name="delete" visibility="public" complexity="2" crap="2.09" count="4"/>
1172
+ <line num="192" type="stmt" count="4"/>
 
1173
  <line num="195" type="stmt" count="4"/>
1174
+ <line num="202" type="stmt" count="4"/>
1175
+ <line num="203" type="stmt" count="4"/>
1176
+ <line num="204" type="stmt" count="0"/>
1177
+ <line num="205" type="stmt" count="0"/>
1178
+ <line num="207" type="stmt" count="4"/>
1179
+ <line num="218" type="method" name="get_attribute" visibility="public" complexity="2" crap="2" count="9"/>
1180
+ <line num="219" type="stmt" count="9"/>
1181
+ <line num="241" type="method" name="get_by_name" visibility="public" complexity="3" crap="12" count="0"/>
 
 
 
1182
  <line num="242" type="stmt" count="0"/>
1183
+ <line num="244" type="stmt" count="0"/>
1184
+ <line num="246" type="stmt" count="0"/>
1185
+ <line num="247" type="stmt" count="0"/>
1186
+ <line num="248" type="stmt" count="0"/>
1187
+ <line num="249" type="stmt" count="0"/>
1188
+ <line num="250" type="stmt" count="0"/>
1189
+ <line num="252" type="stmt" count="0"/>
1190
+ <line num="254" type="stmt" count="0"/>
1191
+ <line num="266" type="method" name="get_file" visibility="public" complexity="5" crap="15.55" count="1"/>
1192
+ <line num="267" type="stmt" count="1"/>
1193
+ <line num="268" type="stmt" count="1"/>
1194
+ <line num="271" type="stmt" count="0"/>
1195
+ <line num="273" type="stmt" count="0"/>
1196
+ <line num="276" type="stmt" count="0"/>
1197
+ <line num="277" type="stmt" count="0"/>
1198
+ <line num="278" type="stmt" count="0"/>
1199
+ <line num="280" type="stmt" count="0"/>
1200
+ <line num="291" type="method" name="get_dump_file" visibility="public" complexity="1" crap="1" count="1"/>
1201
+ <line num="297" type="stmt" count="1"/>
1202
+ <line num="307" type="method" name="get_filesize" visibility="public" complexity="2" crap="2" count="9"/>
1203
+ <line num="308" type="stmt" count="9"/>
1204
+ <line num="309" type="stmt" count="4"/>
1205
+ <line num="311" type="stmt" count="9"/>
1206
+ <line num="322" type="method" name="get_id" visibility="public" complexity="1" crap="1" count="5"/>
1207
+ <line num="323" type="stmt" count="5"/>
1208
+ <line num="333" type="method" name="get_index" visibility="public" complexity="3" crap="3" count="13"/>
1209
+ <line num="334" type="stmt" count="13"/>
1210
+ <line num="336" type="stmt" count="13"/>
1211
+ <line num="338" type="stmt" count="13"/>
1212
+ <line num="339" type="stmt" count="13"/>
1213
+ <line num="340" type="stmt" count="12"/>
1214
+ <line num="341" type="stmt" count="12"/>
1215
+ <line num="343" type="stmt" count="13"/>
1216
+ <line num="345" type="stmt" count="13"/>
1217
+ <line num="356" type="method" name="get_key" visibility="public" complexity="1" crap="1" count="1"/>
1218
+ <line num="357" type="stmt" count="1"/>
1219
+ <line num="367" type="method" name="init" visibility="public" complexity="8" crap="8" count="13"/>
1220
  <line num="368" type="stmt" count="13"/>
1221
+ <line num="370" type="stmt" count="13"/>
1222
+ <line num="371" type="stmt" count="0"/>
 
 
1223
  <line num="374" type="stmt" count="13"/>
1224
+ <line num="376" type="stmt" count="13"/>
1225
  <line num="377" type="stmt" count="13"/>
1226
+ <line num="379" type="stmt" count="13"/>
1227
+ <line num="380" type="stmt" count="13"/>
1228
+ <line num="381" type="stmt" count="13"/>
1229
+ <line num="382" type="stmt" count="4"/>
1230
+ <line num="383" type="stmt" count="4"/>
1231
+ <line num="385" type="stmt" count="13"/>
1232
+ <line num="386" type="stmt" count="13"/>
1233
+ <line num="389" type="stmt" count="13"/>
1234
+ <line num="390" type="stmt" count="13"/>
1235
+ <line num="391" type="stmt" count="2"/>
1236
+ <line num="392" type="stmt" count="2"/>
1237
  <line num="394" type="stmt" count="13"/>
1238
+ <line num="395" type="stmt" count="12"/>
1239
+ <line num="397" type="stmt" count="12"/>
1240
+ <line num="398" type="stmt" count="12"/>
1241
+ <line num="406" type="stmt" count="13"/>
1242
+ <line num="408" type="stmt" count="13"/>
1243
+ <line num="410" type="stmt" count="13"/>
1244
+ <line num="411" type="stmt" count="13"/>
1245
+ <line num="423" type="method" name="init_by_filename" visibility="public" complexity="1" crap="1" count="12"/>
1246
+ <line num="424" type="stmt" count="12"/>
1247
+ <line num="426" type="stmt" count="12"/>
1248
+ <line num="427" type="stmt" count="12"/>
1249
+ <line num="437" type="method" name="init_by_key" visibility="public" complexity="3" crap="3" count="2"/>
 
 
 
1250
  <line num="438" type="stmt" count="2"/>
1251
+ <line num="440" type="stmt" count="2"/>
1252
+ <line num="442" type="stmt" count="2"/>
1253
+ <line num="443" type="stmt" count="1"/>
1254
+ <line num="446" type="stmt" count="2"/>
1255
+ <line num="448" type="stmt" count="2"/>
1256
+ <line num="449" type="stmt" count="2"/>
1257
+ <line num="450" type="stmt" count="2"/>
1258
+ <line num="456" type="stmt" count="2"/>
1259
+ <line num="465" type="method" name="init_by_latest" visibility="public" complexity="2" crap="2" count="1"/>
1260
+ <line num="466" type="stmt" count="1"/>
1261
+ <line num="468" type="stmt" count="1"/>
1262
+ <line num="469" type="stmt" count="1"/>
1263
+ <line num="470" type="stmt" count="1"/>
1264
+ <line num="471" type="stmt" count="1"/>
1265
+ <line num="481" type="method" name="is_archive" visibility="public" complexity="3" crap="3" count="3"/>
1266
+ <line num="482" type="stmt" count="3"/>
1267
+ <line num="483" type="stmt" count="3"/>
1268
+ <line num="484" type="stmt" count="3"/>
1269
+ <line num="486" type="stmt" count="3"/>
1270
+ <line num="487" type="stmt" count="3"/>
1271
+ <line num="488" type="stmt" count="2"/>
1272
+ <line num="489" type="stmt" count="2"/>
1273
+ <line num="491" type="stmt" count="3"/>
1274
+ <line num="493" type="stmt" count="3"/>
1275
+ <line num="507" type="method" name="is_site_archive" visibility="public" complexity="4" crap="4.18" count="13"/>
1276
+ <line num="508" type="stmt" count="13"/>
1277
+ <line num="511" type="stmt" count="13"/>
1278
+ <line num="512" type="stmt" count="13"/>
1279
+ <line num="513" type="stmt" count="13"/>
1280
+ <line num="517" type="stmt" count="13"/>
1281
+ <line num="518" type="stmt" count="0"/>
1282
+ <line num="522" type="stmt" count="13"/>
1283
+ <line num="523" type="stmt" count="0"/>
1284
+ <line num="526" type="stmt" count="13"/>
1285
+ <line num="540" type="method" name="is_stored_locally" visibility="public" complexity="2" crap="2" count="1"/>
1286
+ <line num="541" type="stmt" count="1"/>
1287
+ <line num="543" type="stmt" count="1"/>
1288
+ <line num="544" type="stmt" count="1"/>
1289
+ <line num="557" type="method" name="is_stored_remotely" visibility="public" complexity="2" crap="2" count="1"/>
1290
+ <line num="558" type="stmt" count="1"/>
1291
+ <line num="560" type="stmt" count="1"/>
1292
+ <line num="561" type="stmt" count="1"/>
1293
+ <line num="569" type="method" name="reset" visibility="public" complexity="1" crap="1" count="13"/>
1294
+ <line num="570" type="stmt" count="13"/>
1295
+ <line num="571" type="stmt" count="13"/>
1296
+ <line num="572" type="stmt" count="13"/>
1297
+ <line num="573" type="stmt" count="13"/>
1298
+ <line num="574" type="stmt" count="13"/>
1299
+ <line num="575" type="stmt" count="13"/>
1300
+ <line num="578" type="stmt" count="13"/>
1301
+ <line num="579" type="stmt" count="13"/>
1302
+ <line num="580" type="stmt" count="13"/>
1303
+ <line num="591" type="method" name="set_attribute" visibility="public" complexity="3" crap="12" count="0"/>
1304
+ <line num="592" type="stmt" count="0"/>
1305
+ <line num="595" type="stmt" count="0"/>
1306
  <line num="596" type="stmt" count="0"/>
1307
+ <line num="612" type="stmt" count="0"/>
1308
+ <line num="614" type="stmt" count="0"/>
1309
+ <line num="616" type="stmt" count="0"/>
1310
+ <line num="626" type="method" name="set_id" visibility="public" complexity="1" crap="1" count="5"/>
1311
+ <line num="627" type="stmt" count="5"/>
1312
+ <line num="628" type="stmt" count="5"/>
1313
+ <line num="639" type="method" name="update_timestamp" visibility="public" complexity="3" crap="12" count="0"/>
1314
+ <line num="641" type="stmt" count="0"/>
1315
+ <line num="642" type="stmt" count="0"/>
1316
+ <line num="645" type="stmt" count="0"/>
1317
+ <line num="658" type="method" name="validate_link_request" visibility="public" complexity="8" crap="72" count="0"/>
1318
+ <line num="659" type="stmt" count="0"/>
1319
+ <line num="662" type="stmt" count="0"/>
1320
+ <line num="663" type="stmt" count="0"/>
 
 
 
 
 
 
 
 
1321
  <line num="664" type="stmt" count="0"/>
1322
  <line num="667" type="stmt" count="0"/>
1323
  <line num="668" type="stmt" count="0"/>
1324
  <line num="669" type="stmt" count="0"/>
1325
+ <line num="672" type="stmt" count="0"/>
1326
  <line num="673" type="stmt" count="0"/>
1327
  <line num="674" type="stmt" count="0"/>
1328
+ <line num="676" type="stmt" count="0"/>
1329
  <line num="677" type="stmt" count="0"/>
 
1330
  <line num="680" type="stmt" count="0"/>
1331
+ <line num="683" type="stmt" count="0"/>
 
1332
  <line num="684" type="stmt" count="0"/>
1333
+ <line num="685" type="stmt" count="0"/>
1334
+ <line num="687" type="stmt" count="0"/>
1335
+ <line num="689" type="stmt" count="0"/>
1336
+ <line num="690" type="stmt" count="0"/>
1337
+ <line num="691" type="stmt" count="0"/>
1338
+ <line num="693" type="stmt" count="0"/>
1339
+ <line num="694" type="stmt" count="0"/>
1340
+ <line num="696" type="stmt" count="0"/>
1341
+ <line num="697" type="stmt" count="0"/>
1342
+ <line num="698" type="stmt" count="0"/>
1343
+ <line num="700" type="stmt" count="0"/>
1344
+ <line num="716" type="method" name="generate_download_link" visibility="public" complexity="3" crap="12" count="0"/>
 
1345
  <line num="717" type="stmt" count="0"/>
1346
+ <line num="719" type="stmt" count="0"/>
1347
+ <line num="721" type="stmt" count="0"/>
1348
+ <line num="723" type="stmt" count="0"/>
1349
+ <line num="724" type="stmt" count="0"/>
1350
+ <line num="725" type="stmt" count="0"/>
1351
+ <line num="727" type="stmt" count="0"/>
1352
+ <line num="728" type="stmt" count="0"/>
1353
+ <line num="729" type="stmt" count="0"/>
1354
+ <line num="730" type="stmt" count="0"/>
1355
+ <line num="732" type="stmt" count="0"/>
1356
+ <line num="733" type="stmt" count="0"/>
1357
+ <line num="734" type="stmt" count="0"/>
1358
+ <line num="735" type="stmt" count="0"/>
1359
+ <line num="736" type="stmt" count="0"/>
1360
+ <line num="737" type="stmt" count="0"/>
1361
+ <line num="740" type="stmt" count="0"/>
1362
+ <line num="775" type="method" name="write_results_file" visibility="public" complexity="6" crap="42" count="0"/>
 
 
 
1363
  <line num="776" type="stmt" count="0"/>
1364
  <line num="777" type="stmt" count="0"/>
1365
  <line num="778" type="stmt" count="0"/>
1366
  <line num="779" type="stmt" count="0"/>
 
1367
  <line num="781" type="stmt" count="0"/>
1368
+ <line num="782" type="stmt" count="0"/>
1369
  <line num="783" type="stmt" count="0"/>
1370
+ <line num="784" type="stmt" count="0"/>
1371
+ <line num="785" type="stmt" count="0"/>
1372
  <line num="786" type="stmt" count="0"/>
1373
  <line num="787" type="stmt" count="0"/>
1374
  <line num="788" type="stmt" count="0"/>
1375
  <line num="789" type="stmt" count="0"/>
1376
  <line num="790" type="stmt" count="0"/>
1377
  <line num="791" type="stmt" count="0"/>
 
1378
  <line num="793" type="stmt" count="0"/>
1379
  <line num="794" type="stmt" count="0"/>
1380
  <line num="795" type="stmt" count="0"/>
1381
+ <line num="796" type="stmt" count="0"/>
1382
  <line num="797" type="stmt" count="0"/>
1383
  <line num="798" type="stmt" count="0"/>
1384
  <line num="799" type="stmt" count="0"/>
1385
+ <line num="800" type="stmt" count="0"/>
1386
  <line num="801" type="stmt" count="0"/>
1387
+ <line num="803" type="stmt" count="0"/>
1388
+ <line num="806" type="stmt" count="0"/>
1389
+ <line num="807" type="stmt" count="0"/>
1390
+ <line num="808" type="stmt" count="0"/>
1391
+ <line num="809" type="stmt" count="0"/>
1392
+ <line num="810" type="stmt" count="0"/>
1393
+ <line num="811" type="stmt" count="0"/>
1394
+ <line num="812" type="stmt" count="0"/>
1395
+ <line num="813" type="stmt" count="0"/>
1396
+ <line num="814" type="stmt" count="0"/>
1397
+ <line num="815" type="stmt" count="0"/>
1398
+ <line num="817" type="stmt" count="0"/>
1399
+ <line num="818" type="stmt" count="0"/>
1400
+ <line num="819" type="stmt" count="0"/>
1401
+ <line num="821" type="stmt" count="0"/>
1402
+ <line num="822" type="stmt" count="0"/>
1403
  <line num="824" type="stmt" count="0"/>
1404
+ <line num="836" type="method" name="delete_from_archive" visibility="public" complexity="9" crap="12.69" count="9"/>
1405
+ <line num="837" type="stmt" count="9"/>
1406
+ <line num="838" type="stmt" count="9"/>
1407
+ <line num="839" type="stmt" count="9"/>
1408
+ <line num="841" type="stmt" count="9"/>
1409
+ <line num="842" type="stmt" count="9"/>
1410
+ <line num="843" type="stmt" count="9"/>
1411
+ <line num="844" type="stmt" count="0"/>
1412
+ <line num="846" type="stmt" count="0"/>
1413
+ <line num="847" type="stmt" count="0"/>
1414
+ <line num="848" type="stmt" count="0"/>
1415
+ <line num="849" type="stmt" count="0"/>
1416
+ <line num="850" type="stmt" count="9"/>
1417
+ <line num="851" type="stmt" count="9"/>
1418
+ <line num="852" type="stmt" count="9"/>
1419
+ <metrics loc="853" ncloc="401" classes="1" methods="26" coveredmethods="15" conditionals="0" coveredconditionals="0" statements="228" coveredstatements="110" elements="254" coveredelements="125"/>
1420
  </file>
1421
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-archiver-utility.php">
1422
  <class name="Boldgrid_Backup_Admin_Archiver_Utility" namespace="global" fullPackage="Boldgrid.Backup.Admin.Archiver">
7646
  </file>
7647
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-upload.php">
7648
  <class name="Boldgrid_Backup_Admin_Upload" namespace="global" fullPackage="Boldgrid.Backup.Admin">
7649
+ <metrics complexity="38" methods="9" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="177" coveredstatements="2" elements="186" coveredelements="3"/>
7650
  </class>
7651
  <line num="39" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="29"/>
7652
  <line num="41" type="stmt" count="29"/>
7789
  <line num="380" type="stmt" count="0"/>
7790
  <line num="382" type="stmt" count="0"/>
7791
  <line num="384" type="stmt" count="0"/>
7792
+ <line num="403" type="method" name="ajax_url_import" visibility="public" complexity="9" crap="90" count="0"/>
7793
  <line num="404" type="stmt" count="0"/>
7794
  <line num="405" type="stmt" count="0"/>
7795
  <line num="406" type="stmt" count="0"/>
7806
  <line num="425" type="stmt" count="0"/>
7807
  <line num="427" type="stmt" count="0"/>
7808
  <line num="429" type="stmt" count="0"/>
7809
+ <line num="431" type="stmt" count="0"/>
7810
  <line num="432" type="stmt" count="0"/>
7811
  <line num="433" type="stmt" count="0"/>
7812
  <line num="434" type="stmt" count="0"/>
 
7813
  <line num="437" type="stmt" count="0"/>
7814
+ <line num="438" type="stmt" count="0"/>
7815
+ <line num="439" type="stmt" count="0"/>
7816
+ <line num="440" type="stmt" count="0"/>
7817
+ <line num="441" type="stmt" count="0"/>
7818
+ <line num="442" type="stmt" count="0"/>
7819
+ <line num="443" type="stmt" count="0"/>
7820
+ <line num="444" type="stmt" count="0"/>
7821
  <line num="447" type="stmt" count="0"/>
7822
  <line num="448" type="stmt" count="0"/>
7823
  <line num="449" type="stmt" count="0"/>
7824
+ <line num="450" type="stmt" count="0"/>
7825
+ <line num="451" type="stmt" count="0"/>
7826
+ <line num="454" type="stmt" count="0"/>
7827
+ <line num="455" type="stmt" count="0"/>
7828
+ <line num="456" type="stmt" count="0"/>
7829
+ <line num="457" type="stmt" count="0"/>
7830
+ <line num="459" type="stmt" count="0"/>
7831
+ <line num="466" type="method" name="archive_upload_action" visibility="public" complexity="3" crap="12" count="0"/>
7832
+ <line num="467" type="stmt" count="0"/>
7833
+ <line num="468" type="stmt" count="0"/>
7834
+ <line num="469" type="stmt" count="0"/>
7835
+ <line num="470" type="stmt" count="0"/>
7836
+ <line num="471" type="stmt" count="0"/>
7837
+ <metrics loc="472" ncloc="246" classes="1" methods="9" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="177" coveredstatements="2" elements="186" coveredelements="3"/>
7838
  </file>
7839
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-usage.php">
7840
  <class name="Boldgrid_Backup_Admin_Usage" namespace="global" fullPackage="Boldgrid.Backup.Admin">
7871
  </file>
7872
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-utility.php">
7873
  <class name="Boldgrid_Backup_Admin_Utility" namespace="global" fullPackage="Boldgrid.Backup.Admin">
7874
+ <metrics complexity="97" methods="24" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="330" coveredstatements="44" elements="354" coveredelements="47"/>
7875
  </class>
7876
  <line num="34" type="method" name="bytes_to_human" visibility="public" complexity="3" crap="3" count="9"/>
7877
  <line num="36" type="stmt" count="9"/>
8007
  <line num="320" type="stmt" count="0"/>
8008
  <line num="321" type="stmt" count="0"/>
8009
  <line num="323" type="stmt" count="0"/>
8010
+ <line num="329" type="method" name="move_dir" visibility="public" complexity="10" crap="110" count="0"/>
8011
+ <line num="330" type="stmt" count="0"/>
8012
+ <line num="332" type="stmt" count="0"/>
8013
+ <line num="334" type="stmt" count="0"/>
8014
+ <line num="335" type="stmt" count="0"/>
8015
+ <line num="338" type="stmt" count="0"/>
8016
+ <line num="339" type="stmt" count="0"/>
8017
+ <line num="340" type="stmt" count="0"/>
8018
+ <line num="341" type="stmt" count="0"/>
8019
+ <line num="343" type="stmt" count="0"/>
8020
+ <line num="345" type="stmt" count="0"/>
8021
+ <line num="346" type="stmt" count="0"/>
8022
+ <line num="348" type="stmt" count="0"/>
8023
+ <line num="350" type="stmt" count="0"/>
8024
+ <line num="351" type="stmt" count="0"/>
8025
+ <line num="352" type="stmt" count="0"/>
8026
  <line num="353" type="stmt" count="0"/>
8027
+ <line num="356" type="stmt" count="0"/>
8028
+ <line num="357" type="stmt" count="0"/>
8029
  <line num="359" type="stmt" count="0"/>
8030
+ <line num="361" type="stmt" count="0"/>
8031
+ <line num="362" type="stmt" count="0"/>
8032
+ <line num="364" type="stmt" count="0"/>
8033
+ <line num="365" type="stmt" count="0"/>
8034
  <line num="371" type="stmt" count="0"/>
8035
+ <line num="372" type="stmt" count="0"/>
8036
  <line num="373" type="stmt" count="0"/>
8037
  <line num="375" type="stmt" count="0"/>
8038
+ <line num="387" type="method" name="starts_with" visibility="public" complexity="1" crap="1" count="1"/>
8039
+ <line num="388" type="stmt" count="1"/>
8040
+ <line num="403" type="method" name="bump_max_execution" visibility="public" complexity="7" crap="56" count="0"/>
8041
+ <line num="405" type="stmt" count="0"/>
8042
+ <line num="406" type="stmt" count="0"/>
8043
+ <line num="410" type="stmt" count="0"/>
8044
+ <line num="411" type="stmt" count="0"/>
8045
+ <line num="415" type="stmt" count="0"/>
8046
  <line num="419" type="stmt" count="0"/>
8047
+ <line num="420" type="stmt" count="0"/>
8048
  <line num="422" type="stmt" count="0"/>
8049
+ <line num="423" type="stmt" count="0"/>
8050
+ <line num="425" type="stmt" count="0"/>
8051
+ <line num="427" type="stmt" count="0"/>
8052
+ <line num="442" type="method" name="get_plugin_data" visibility="public" complexity="1" crap="2" count="0"/>
8053
+ <line num="443" type="stmt" count="0"/>
8054
+ <line num="444" type="stmt" count="0"/>
8055
+ <line num="445" type="stmt" count="0"/>
8056
+ <line num="461" type="method" name="get_upload_limit" visibility="public" complexity="1" crap="2" count="0"/>
8057
+ <line num="464" type="stmt" count="0"/>
8058
+ <line num="468" type="stmt" count="0"/>
8059
+ <line num="471" type="stmt" count="0"/>
8060
+ <line num="474" type="stmt" count="0"/>
8061
+ <line num="487" type="method" name="get_url_params" visibility="public" complexity="1" crap="2" count="0"/>
8062
  <line num="488" type="stmt" count="0"/>
8063
+ <line num="490" type="stmt" count="0"/>
8064
+ <line num="492" type="stmt" count="0"/>
8065
+ <line num="509" type="method" name="bump_memory_limit" visibility="public" complexity="5" crap="5.20" count="9"/>
8066
+ <line num="511" type="stmt" count="9"/>
8067
+ <line num="512" type="stmt" count="0"/>
8068
+ <line num="516" type="stmt" count="9"/>
8069
+ <line num="519" type="stmt" count="9"/>
8070
+ <line num="522" type="stmt" count="9"/>
8071
+ <line num="526" type="stmt" count="9"/>
8072
+ <line num="527" type="stmt" count="3"/>
8073
+ <line num="528" type="stmt" count="0"/>
8074
+ <line num="530" type="stmt" count="3"/>
8075
+ <line num="532" type="stmt" count="9"/>
8076
+ <line num="555" type="method" name="bump_upload_limit" visibility="public" complexity="4" crap="20" count="0"/>
8077
+ <line num="557" type="stmt" count="0"/>
8078
+ <line num="558" type="stmt" count="0"/>
8079
  <line num="563" type="stmt" count="0"/>
8080
+ <line num="564" type="stmt" count="0"/>
8081
+ <line num="569" type="stmt" count="0"/>
8082
  <line num="570" type="stmt" count="0"/>
8083
+ <line num="574" type="stmt" count="0"/>
8084
+ <line num="577" type="stmt" count="0"/>
8085
  <line num="579" type="stmt" count="0"/>
8086
+ <line num="596" type="method" name="is_active" visibility="public" complexity="1" crap="1" count="29"/>
8087
+ <line num="597" type="stmt" count="29"/>
8088
+ <line num="599" type="stmt" count="29"/>
8089
+ <line num="612" type="method" name="is_admin_page" visibility="public" complexity="3" crap="3" count="1"/>
8090
+ <line num="613" type="stmt" count="1"/>
8091
+ <line num="615" type="stmt" count="1"/>
8092
+ <line num="630" type="method" name="is_zip_file" visibility="public" complexity="2" crap="6" count="0"/>
8093
+ <line num="632" type="stmt" count="0"/>
8094
+ <line num="633" type="stmt" count="0"/>
8095
+ <line num="637" type="stmt" count="0"/>
8096
+ <line num="640" type="stmt" count="0"/>
 
 
 
8097
  <line num="643" type="stmt" count="0"/>
8098
  <line num="646" type="stmt" count="0"/>
8099
  <line num="649" type="stmt" count="0"/>
8100
+ <line num="666" type="method" name="zip_file_exists" visibility="public" complexity="5" crap="30" count="0"/>
8101
  <line num="668" type="stmt" count="0"/>
8102
+ <line num="669" type="stmt" count="0"/>
8103
+ <line num="673" type="stmt" count="0"/>
8104
+ <line num="676" type="stmt" count="0"/>
8105
+ <line num="678" type="stmt" count="0"/>
8106
+ <line num="680" type="stmt" count="0"/>
8107
  <line num="684" type="stmt" count="0"/>
8108
  <line num="685" type="stmt" count="0"/>
8109
  <line num="686" type="stmt" count="0"/>
8110
  <line num="687" type="stmt" count="0"/>
 
 
 
8111
  <line num="691" type="stmt" count="0"/>
 
 
8112
  <line num="694" type="stmt" count="0"/>
8113
+ <line num="711" type="method" name="chmod" visibility="public" complexity="1" crap="2" count="0"/>
8114
+ <line num="713" type="stmt" count="0"/>
8115
+ <line num="716" type="stmt" count="0"/>
8116
+ <line num="719" type="stmt" count="0"/>
8117
+ <line num="736" type="method" name="fix_wpconfig" visibility="public" complexity="5" crap="30" count="0"/>
8118
+ <line num="738" type="stmt" count="0"/>
8119
+ <line num="741" type="stmt" count="0"/>
 
 
 
 
 
 
 
 
 
8120
  <line num="744" type="stmt" count="0"/>
8121
+ <line num="745" type="stmt" count="0"/>
8122
+ <line num="749" type="stmt" count="0"/>
 
8123
  <line num="753" type="stmt" count="0"/>
8124
+ <line num="754" type="stmt" count="0"/>
8125
+ <line num="755" type="stmt" count="0"/>
8126
+ <line num="756" type="stmt" count="0"/>
8127
  <line num="757" type="stmt" count="0"/>
8128
  <line num="758" type="stmt" count="0"/>
8129
+ <line num="759" type="stmt" count="0"/>
8130
+ <line num="760" type="stmt" count="0"/>
8131
  <line num="761" type="stmt" count="0"/>
8132
+ <line num="762" type="stmt" count="0"/>
8133
+ <line num="763" type="stmt" count="0"/>
8134
  <line num="764" type="stmt" count="0"/>
8135
+ <line num="765" type="stmt" count="0"/>
8136
+ <line num="768" type="stmt" count="0"/>
8137
  <line num="770" type="stmt" count="0"/>
8138
+ <line num="771" type="stmt" count="0"/>
8139
  <line num="776" type="stmt" count="0"/>
 
8140
  <line num="779" type="stmt" count="0"/>
8141
  <line num="780" type="stmt" count="0"/>
8142
  <line num="781" type="stmt" count="0"/>
8143
+ <line num="782" type="stmt" count="0"/>
8144
  <line num="784" type="stmt" count="0"/>
8145
  <line num="787" type="stmt" count="0"/>
8146
+ <line num="788" type="stmt" count="0"/>
8147
  <line num="790" type="stmt" count="0"/>
 
8148
  <line num="793" type="stmt" count="0"/>
8149
+ <line num="795" type="stmt" count="0"/>
8150
+ <line num="812" type="method" name="update_siteurl" visibility="public" complexity="6" crap="42" count="0"/>
8151
+ <line num="814" type="stmt" count="0"/>
 
 
 
 
 
 
 
8152
  <line num="817" type="stmt" count="0"/>
8153
  <line num="818" type="stmt" count="0"/>
 
8154
  <line num="822" type="stmt" count="0"/>
8155
  <line num="823" type="stmt" count="0"/>
8156
+ <line num="827" type="stmt" count="0"/>
8157
  <line num="828" type="stmt" count="0"/>
8158
+ <line num="831" type="stmt" count="0"/>
 
 
8159
  <line num="834" type="stmt" count="0"/>
 
8160
  <line num="837" type="stmt" count="0"/>
8161
+ <line num="840" type="stmt" count="0"/>
8162
+ <line num="845" type="stmt" count="0"/>
8163
+ <line num="846" type="stmt" count="0"/>
8164
+ <line num="847" type="stmt" count="0"/>
8165
+ <line num="849" type="stmt" count="0"/>
8166
+ <line num="850" type="stmt" count="0"/>
8167
+ <line num="851" type="stmt" count="0"/>
8168
  <line num="853" type="stmt" count="0"/>
8169
  <line num="854" type="stmt" count="0"/>
8170
+ <line num="857" type="stmt" count="0"/>
 
 
8171
  <line num="859" type="stmt" count="0"/>
8172
  <line num="860" type="stmt" count="0"/>
8173
  <line num="862" type="stmt" count="0"/>
8174
  <line num="863" type="stmt" count="0"/>
 
 
8175
  <line num="867" type="stmt" count="0"/>
8176
  <line num="868" type="stmt" count="0"/>
8177
  <line num="869" type="stmt" count="0"/>
8179
  <line num="872" type="stmt" count="0"/>
8180
  <line num="873" type="stmt" count="0"/>
8181
  <line num="875" type="stmt" count="0"/>
8182
+ <line num="877" type="stmt" count="0"/>
8183
+ <line num="882" type="stmt" count="0"/>
8184
+ <line num="883" type="stmt" count="0"/>
8185
  <line num="887" type="stmt" count="0"/>
8186
+ <line num="888" type="stmt" count="0"/>
8187
+ <line num="891" type="stmt" count="0"/>
8188
+ <line num="892" type="stmt" count="0"/>
8189
  <line num="893" type="stmt" count="0"/>
8190
+ <line num="895" type="stmt" count="0"/>
8191
+ <line num="898" type="stmt" count="0"/>
8192
+ <line num="899" type="stmt" count="0"/>
8193
+ <line num="900" type="stmt" count="0"/>
8194
+ <line num="902" type="stmt" count="0"/>
8195
+ <line num="904" type="stmt" count="0"/>
8196
+ <line num="905" type="stmt" count="0"/>
8197
+ <line num="907" type="stmt" count="0"/>
8198
+ <line num="922" type="method" name="str_replace_recursive" visibility="public" complexity="6" crap="42" count="0"/>
8199
+ <line num="923" type="stmt" count="0"/>
8200
+ <line num="924" type="stmt" count="0"/>
8201
+ <line num="925" type="stmt" count="0"/>
8202
+ <line num="926" type="stmt" count="0"/>
8203
+ <line num="928" type="stmt" count="0"/>
8204
+ <line num="929" type="stmt" count="0"/>
8205
+ <line num="930" type="stmt" count="0"/>
8206
+ <line num="932" type="stmt" count="0"/>
8207
+ <line num="933" type="stmt" count="0"/>
8208
+ <line num="934" type="stmt" count="0"/>
8209
+ <line num="935" type="stmt" count="0"/>
8210
+ <line num="937" type="stmt" count="0"/>
8211
+ <line num="938" type="stmt" count="0"/>
8212
+ <line num="939" type="stmt" count="0"/>
8213
+ <line num="941" type="stmt" count="0"/>
8214
+ <line num="942" type="stmt" count="0"/>
8215
+ <line num="943" type="stmt" count="0"/>
8216
+ <line num="945" type="stmt" count="0"/>
8217
+ <line num="956" type="method" name="time" visibility="public" complexity="3" crap="12" count="0"/>
8218
+ <line num="957" type="stmt" count="0"/>
8219
+ <line num="959" type="stmt" count="0"/>
8220
+ <line num="960" type="stmt" count="0"/>
8221
+ <line num="963" type="stmt" count="0"/>
8222
+ <line num="979" type="method" name="trailingslashit" visibility="public" complexity="3" crap="3.71" count="14"/>
8223
+ <line num="981" type="stmt" count="14"/>
8224
+ <line num="982" type="stmt" count="14"/>
8225
+ <line num="983" type="stmt" count="14"/>
8226
+ <line num="984" type="stmt" count="0"/>
8227
+ <line num="985" type="stmt" count="0"/>
8228
+ <line num="986" type="stmt" count="0"/>
8229
+ <line num="989" type="stmt" count="14"/>
8230
+ <metrics loc="991" ncloc="471" classes="1" methods="24" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="330" coveredstatements="44" elements="354" coveredelements="47"/>
8231
  </file>
8232
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-wp-cron.php">
8233
  <class name="Boldgrid_Backup_Admin_WP_Cron" namespace="global" fullPackage="Boldgrid.Backup.Admin.WP">
14293
  <line num="62" type="stmt" count="0"/>
14294
  <line num="63" type="stmt" count="0"/>
14295
  <line num="64" type="stmt" count="0"/>
14296
+ <line num="65" type="stmt" count="0"/>
14297
  <line num="67" type="stmt" count="0"/>
14298
  <line num="68" type="stmt" count="0"/>
14299
  <line num="69" type="stmt" count="0"/>
14300
  <line num="70" type="stmt" count="0"/>
14301
+ <line num="71" type="stmt" count="0"/>
14302
  <line num="74" type="stmt" count="0"/>
14303
  <line num="75" type="stmt" count="0"/>
14304
  <line num="76" type="stmt" count="0"/>
14305
  <line num="77" type="stmt" count="0"/>
14306
  <line num="78" type="stmt" count="0"/>
14307
+ <line num="79" type="stmt" count="0"/>
14308
  <line num="81" type="stmt" count="0"/>
14309
  <line num="82" type="stmt" count="0"/>
14310
+ <line num="83" type="stmt" count="0"/>
14311
  <line num="85" type="stmt" count="0"/>
14312
  <line num="86" type="stmt" count="0"/>
14313
+ <line num="87" type="stmt" count="0"/>
14314
+ <line num="89" type="stmt" count="0"/>
14315
  <line num="92" type="stmt" count="0"/>
14316
  <line num="93" type="stmt" count="0"/>
14317
+ <line num="94" type="stmt" count="0"/>
14318
  <line num="96" type="stmt" count="0"/>
14319
  <line num="97" type="stmt" count="0"/>
14320
  <line num="98" type="stmt" count="0"/>
14321
  <line num="99" type="stmt" count="0"/>
14322
  <line num="100" type="stmt" count="0"/>
14323
  <line num="101" type="stmt" count="0"/>
14324
+ <line num="102" type="stmt" count="0"/>
14325
+ <line num="104" type="stmt" count="0"/>
14326
+ <metrics loc="104" ncloc="73" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="62" coveredstatements="0" elements="62" coveredelements="0"/>
14327
  </file>
14328
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/boldgrid-backup.php">
14329
  <line num="29" type="stmt" count="0"/>
15590
  </file>
15591
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-archive-fetcher.php">
15592
  <class name="Boldgrid_Backup_Archive_Fetcher" namespace="global" fullPackage="Boldgrid.Backup.Archive">
15593
+ <metrics complexity="11" methods="8" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="48" coveredstatements="0" elements="56" coveredelements="0"/>
15594
  </class>
15595
+ <line num="102" type="method" name="__construct" visibility="public" complexity="1" crap="2" count="0"/>
15596
+ <line num="103" type="stmt" count="0"/>
15597
+ <line num="105" type="stmt" count="0"/>
15598
+ <line num="106" type="stmt" count="0"/>
15599
+ <line num="107" type="stmt" count="0"/>
15600
+ <line num="116" type="method" name="download" visibility="public" complexity="2" crap="6" count="0"/>
15601
  <line num="118" type="stmt" count="0"/>
15602
+ <line num="120" type="stmt" count="0"/>
15603
+ <line num="121" type="stmt" count="0"/>
15604
+ <line num="123" type="stmt" count="0"/>
15605
+ <line num="124" type="stmt" count="0"/>
15606
+ <line num="125" type="stmt" count="0"/>
15607
+ <line num="126" type="stmt" count="0"/>
15608
+ <line num="127" type="stmt" count="0"/>
15609
+ <line num="128" type="stmt" count="0"/>
15610
  <line num="130" type="stmt" count="0"/>
15611
  <line num="131" type="stmt" count="0"/>
15612
  <line num="132" type="stmt" count="0"/>
15613
+ <line num="141" type="method" name="get_error" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
 
15614
  <line num="142" type="stmt" count="0"/>
15615
  <line num="143" type="stmt" count="0"/>
15616
+ <line num="152" type="method" name="get_info" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
 
 
 
15617
  <line num="153" type="stmt" count="0"/>
15618
+ <line num="154" type="stmt" count="0"/>
15619
+ <line num="163" type="method" name="has_error" visibility="public" complexity="1" crap="2" count="0"/>
 
 
 
 
 
15620
  <line num="164" type="stmt" count="0"/>
15621
  <line num="165" type="stmt" count="0"/>
15622
+ <line num="174" type="method" name="is_valid_backupdir" visibility="private" complexity="2" crap="6" count="0"/>
15623
+ <line num="175" type="stmt" count="0"/>
 
15624
  <line num="177" type="stmt" count="0"/>
15625
+ <line num="178" type="stmt" count="0"/>
15626
+ <line num="185" type="method" name="post_successful_download" visibility="private" complexity="1" crap="2" count="0"/>
15627
+ <line num="186" type="stmt" count="0"/>
15628
  <line num="188" type="stmt" count="0"/>
15629
+ <line num="191" type="stmt" count="0"/>
15630
+ <line num="194" type="stmt" count="0"/>
15631
+ <line num="197" type="stmt" count="0"/>
15632
  <line num="199" type="stmt" count="0"/>
15633
+ <line num="200" type="stmt" count="0"/>
15634
+ <line num="201" type="stmt" count="0"/>
15635
+ <line num="202" type="stmt" count="0"/>
15636
+ <line num="203" type="stmt" count="0"/>
15637
+ <line num="204" type="stmt" count="0"/>
15638
+ <line num="205" type="stmt" count="0"/>
15639
+ <line num="212" type="method" name="set_logfilepath" visibility="private" complexity="2" crap="6" count="0"/>
15640
  <line num="213" type="stmt" count="0"/>
 
15641
  <line num="215" type="stmt" count="0"/>
15642
+ <line num="216" type="stmt" count="0"/>
15643
+ <line num="217" type="stmt" count="0"/>
15644
+ <line num="218" type="stmt" count="0"/>
15645
+ <line num="219" type="stmt" count="0"/>
15646
+ <line num="220" type="stmt" count="0"/>
15647
+ <line num="222" type="stmt" count="0"/>
15648
+ <line num="223" type="stmt" count="0"/>
15649
  <line num="225" type="stmt" count="0"/>
15650
+ <line num="226" type="stmt" count="0"/>
15651
+ <metrics loc="227" ncloc="90" classes="1" methods="8" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="48" coveredstatements="0" elements="56" coveredelements="0"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15652
  </file>
15653
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-archiver.php">
15654
  <class name="Boldgrid_Backup_Archiver" namespace="global" fullPackage="Boldgrid.Backup">
15863
  </file>
15864
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-download.php">
15865
  <class name="Boldgrid_Backup_Download" namespace="global" fullPackage="Boldgrid.Backup">
15866
+ <metrics complexity="9" methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="29" coveredstatements="2" elements="32" coveredelements="3"/>
15867
  </class>
15868
  <line num="37" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="29"/>
15869
  <line num="38" type="stmt" count="29"/>
15874
  <line num="56" type="stmt" count="0"/>
15875
  <line num="57" type="stmt" count="0"/>
15876
  <line num="59" type="stmt" count="0"/>
15877
+ <line num="60" type="stmt" count="0"/>
15878
  <line num="61" type="stmt" count="0"/>
 
15879
  <line num="63" type="stmt" count="0"/>
15880
  <line num="65" type="stmt" count="0"/>
15881
+ <line num="67" type="stmt" count="0"/>
15882
+ <line num="68" type="stmt" count="0"/>
15883
+ <line num="73" type="method" name="download_virtual" visibility="private" complexity="4" crap="20" count="0"/>
15884
+ <line num="75" type="stmt" count="0"/>
15885
+ <line num="76" type="stmt" count="0"/>
15886
+ <line num="84" type="stmt" count="0"/>
15887
+ <line num="86" type="stmt" count="0"/>
15888
+ <line num="88" type="stmt" count="0"/>
15889
+ <line num="89" type="stmt" count="0"/>
15890
+ <line num="90" type="stmt" count="0"/>
15891
+ <line num="91" type="stmt" count="0"/>
15892
+ <line num="94" type="stmt" count="0"/>
15893
+ <line num="95" type="stmt" count="0"/>
15894
+ <line num="96" type="stmt" count="0"/>
15895
+ <line num="98" type="stmt" count="0"/>
15896
+ <line num="99" type="stmt" count="0"/>
15897
+ <line num="100" type="stmt" count="0"/>
15898
+ <line num="101" type="stmt" count="0"/>
15899
+ <line num="103" type="stmt" count="0"/>
15900
+ <metrics loc="104" ncloc="43" classes="1" methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="29" coveredstatements="2" elements="32" coveredelements="3"/>
15901
  </file>
15902
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
15903
  <class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
16185
  </file>
16186
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup.php">
16187
  <class name="Boldgrid_Backup" namespace="global" fullPackage="Boldgrid">
16188
+ <metrics complexity="19" methods="9" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="329" coveredstatements="0" elements="338" coveredelements="0"/>
16189
  </class>
16190
  <line num="66" type="method" name="__construct" visibility="public" complexity="2" crap="6" count="0"/>
16191
  <line num="67" type="stmt" count="0"/>
16199
  <line num="97" type="stmt" count="0"/>
16200
  <line num="103" type="stmt" count="0"/>
16201
  <line num="108" type="stmt" count="0"/>
16202
+ <line num="111" type="stmt" count="0"/>
16203
+ <line num="112" type="stmt" count="0"/>
16204
  <line num="113" type="stmt" count="0"/>
16205
  <line num="118" type="stmt" count="0"/>
16206
  <line num="123" type="stmt" count="0"/>
16353
  <line num="372" type="stmt" count="0"/>
16354
  <line num="373" type="stmt" count="0"/>
16355
  <line num="374" type="stmt" count="0"/>
16356
+ <line num="375" type="stmt" count="0"/>
16357
+ <line num="378" type="stmt" count="0"/>
16358
+ <line num="379" type="stmt" count="0"/>
16359
+ <line num="380" type="stmt" count="0"/>
16360
+ <line num="381" type="stmt" count="0"/>
16361
+ <line num="382" type="stmt" count="0"/>
16362
+ <line num="383" type="stmt" count="0"/>
16363
+ <line num="384" type="stmt" count="0"/>
16364
+ <line num="386" type="stmt" count="0"/>
16365
+ <line num="387" type="stmt" count="0"/>
16366
+ <line num="398" type="method" name="set_locale" visibility="private" complexity="1" crap="2" count="0"/>
16367
+ <line num="399" type="stmt" count="0"/>
16368
+ <line num="401" type="stmt" count="0"/>
16369
  <line num="402" type="stmt" count="0"/>
16370
+ <line num="410" type="method" name="define_admin_hooks" visibility="private" complexity="7" crap="56" count="0"/>
 
 
 
16371
  <line num="412" type="stmt" count="0"/>
 
16372
  <line num="414" type="stmt" count="0"/>
 
16373
  <line num="417" type="stmt" count="0"/>
16374
  <line num="418" type="stmt" count="0"/>
16375
+ <line num="419" type="stmt" count="0"/>
16376
+ <line num="420" type="stmt" count="0"/>
16377
  <line num="423" type="stmt" count="0"/>
16378
  <line num="424" type="stmt" count="0"/>
16379
+ <line num="425" type="stmt" count="0"/>
16380
  <line num="427" type="stmt" count="0"/>
16381
  <line num="428" type="stmt" count="0"/>
16382
  <line num="429" type="stmt" count="0"/>
 
16383
  <line num="432" type="stmt" count="0"/>
16384
  <line num="433" type="stmt" count="0"/>
16385
  <line num="434" type="stmt" count="0"/>
16386
  <line num="435" type="stmt" count="0"/>
16387
+ <line num="438" type="stmt" count="0"/>
16388
  <line num="439" type="stmt" count="0"/>
16389
  <line num="440" type="stmt" count="0"/>
16390
  <line num="441" type="stmt" count="0"/>
16391
+ <line num="443" type="stmt" count="0"/>
16392
+ <line num="444" type="stmt" count="0"/>
16393
  <line num="445" type="stmt" count="0"/>
16394
  <line num="446" type="stmt" count="0"/>
16395
  <line num="447" type="stmt" count="0"/>
16396
+ <line num="450" type="stmt" count="0"/>
16397
  <line num="451" type="stmt" count="0"/>
16398
  <line num="452" type="stmt" count="0"/>
16399
  <line num="453" type="stmt" count="0"/>
16400
+ <line num="456" type="stmt" count="0"/>
16401
  <line num="457" type="stmt" count="0"/>
16402
  <line num="458" type="stmt" count="0"/>
16403
  <line num="459" type="stmt" count="0"/>
16404
+ <line num="462" type="stmt" count="0"/>
16405
  <line num="463" type="stmt" count="0"/>
16406
  <line num="464" type="stmt" count="0"/>
16407
  <line num="465" type="stmt" count="0"/>
16408
+ <line num="468" type="stmt" count="0"/>
16409
  <line num="469" type="stmt" count="0"/>
16410
  <line num="470" type="stmt" count="0"/>
16411
  <line num="471" type="stmt" count="0"/>
 
16412
  <line num="474" type="stmt" count="0"/>
16413
  <line num="475" type="stmt" count="0"/>
16414
  <line num="476" type="stmt" count="0"/>
16415
+ <line num="477" type="stmt" count="0"/>
16416
  <line num="480" type="stmt" count="0"/>
16417
  <line num="481" type="stmt" count="0"/>
16418
  <line num="482" type="stmt" count="0"/>
16419
+ <line num="483" type="stmt" count="0"/>
16420
  <line num="485" type="stmt" count="0"/>
16421
  <line num="486" type="stmt" count="0"/>
16422
  <line num="487" type="stmt" count="0"/>
 
16423
  <line num="490" type="stmt" count="0"/>
16424
  <line num="491" type="stmt" count="0"/>
16425
  <line num="492" type="stmt" count="0"/>
16426
  <line num="493" type="stmt" count="0"/>
16427
+ <line num="496" type="stmt" count="0"/>
 
16428
  <line num="497" type="stmt" count="0"/>
16429
+ <line num="498" type="stmt" count="0"/>
16430
  <line num="499" type="stmt" count="0"/>
16431
  <line num="501" type="stmt" count="0"/>
16432
+ <line num="502" type="stmt" count="0"/>
16433
  <line num="503" type="stmt" count="0"/>
16434
  <line num="504" type="stmt" count="0"/>
16435
  <line num="505" type="stmt" count="0"/>
16436
+ <line num="506" type="stmt" count="0"/>
16437
  <line num="508" type="stmt" count="0"/>
16438
  <line num="510" type="stmt" count="0"/>
16439
  <line num="512" type="stmt" count="0"/>
16440
  <line num="514" type="stmt" count="0"/>
16441
+ <line num="515" type="stmt" count="0"/>
16442
  <line num="516" type="stmt" count="0"/>
16443
  <line num="518" type="stmt" count="0"/>
16444
  <line num="519" type="stmt" count="0"/>
16445
+ <line num="521" type="stmt" count="0"/>
16446
+ <line num="523" type="stmt" count="0"/>
 
16447
  <line num="525" type="stmt" count="0"/>
 
16448
  <line num="527" type="stmt" count="0"/>
16449
  <line num="529" type="stmt" count="0"/>
16450
+ <line num="530" type="stmt" count="0"/>
16451
  <line num="531" type="stmt" count="0"/>
16452
  <line num="533" type="stmt" count="0"/>
16453
  <line num="535" type="stmt" count="0"/>
16454
+ <line num="536" type="stmt" count="0"/>
16455
  <line num="537" type="stmt" count="0"/>
16456
+ <line num="538" type="stmt" count="0"/>
16457
+ <line num="540" type="stmt" count="0"/>
16458
+ <line num="542" type="stmt" count="0"/>
16459
  <line num="544" type="stmt" count="0"/>
16460
  <line num="546" type="stmt" count="0"/>
16461
  <line num="548" type="stmt" count="0"/>
16462
  <line num="550" type="stmt" count="0"/>
16463
+ <line num="555" type="stmt" count="0"/>
16464
+ <line num="557" type="stmt" count="0"/>
 
 
16465
  <line num="559" type="stmt" count="0"/>
16466
  <line num="561" type="stmt" count="0"/>
16467
+ <line num="563" type="stmt" count="0"/>
16468
+ <line num="565" type="stmt" count="0"/>
 
16469
  <line num="567" type="stmt" count="0"/>
16470
+ <line num="569" type="stmt" count="0"/>
16471
  <line num="570" type="stmt" count="0"/>
16472
  <line num="572" type="stmt" count="0"/>
16473
  <line num="573" type="stmt" count="0"/>
16474
+ <line num="575" type="stmt" count="0"/>
16475
  <line num="577" type="stmt" count="0"/>
16476
  <line num="578" type="stmt" count="0"/>
16477
  <line num="579" type="stmt" count="0"/>
16478
+ <line num="581" type="stmt" count="0"/>
16479
  <line num="583" type="stmt" count="0"/>
16480
  <line num="584" type="stmt" count="0"/>
16481
  <line num="587" type="stmt" count="0"/>
16482
+ <line num="588" type="stmt" count="0"/>
16483
+ <line num="589" type="stmt" count="0"/>
16484
  <line num="590" type="stmt" count="0"/>
16485
+ <line num="591" type="stmt" count="0"/>
16486
+ <line num="592" type="stmt" count="0"/>
16487
+ <line num="595" type="stmt" count="0"/>
16488
  <line num="596" type="stmt" count="0"/>
16489
+ <line num="599" type="stmt" count="0"/>
 
16490
  <line num="602" type="stmt" count="0"/>
16491
+ <line num="605" type="stmt" count="0"/>
 
16492
  <line num="608" type="stmt" count="0"/>
 
16493
  <line num="610" type="stmt" count="0"/>
 
16494
  <line num="612" type="stmt" count="0"/>
16495
+ <line num="614" type="stmt" count="0"/>
16496
+ <line num="616" type="stmt" count="0"/>
16497
  <line num="619" type="stmt" count="0"/>
16498
+ <line num="620" type="stmt" count="0"/>
16499
+ <line num="621" type="stmt" count="0"/>
16500
+ <line num="622" type="stmt" count="0"/>
16501
  <line num="623" type="stmt" count="0"/>
16502
  <line num="624" type="stmt" count="0"/>
 
16503
  <line num="627" type="stmt" count="0"/>
 
16504
  <line num="630" type="stmt" count="0"/>
16505
+ <line num="631" type="stmt" count="0"/>
16506
+ <line num="634" type="method" name="anonymous function" complexity="1" crap="2" count="0"/>
16507
+ <line num="635" type="stmt" count="0"/>
16508
  <line num="636" type="stmt" count="0"/>
16509
  <line num="638" type="stmt" count="0"/>
16510
  <line num="639" type="stmt" count="0"/>
 
16511
  <line num="641" type="stmt" count="0"/>
16512
  <line num="642" type="stmt" count="0"/>
16513
+ <line num="644" type="stmt" count="0"/>
16514
+ <line num="645" type="stmt" count="0"/>
16515
  <line num="646" type="stmt" count="0"/>
 
16516
  <line num="648" type="stmt" count="0"/>
16517
+ <line num="650" type="stmt" count="0"/>
16518
  <line num="651" type="stmt" count="0"/>
16519
+ <line num="652" type="stmt" count="0"/>
16520
+ <line num="653" type="stmt" count="0"/>
16521
+ <line num="654" type="stmt" count="0"/>
16522
+ <line num="655" type="stmt" count="0"/>
16523
  <line num="658" type="stmt" count="0"/>
16524
  <line num="659" type="stmt" count="0"/>
16525
  <line num="660" type="stmt" count="0"/>
 
16526
  <line num="663" type="stmt" count="0"/>
16527
+ <line num="670" type="stmt" count="0"/>
16528
+ <line num="671" type="stmt" count="0"/>
16529
  <line num="672" type="stmt" count="0"/>
 
16530
  <line num="674" type="stmt" count="0"/>
16531
  <line num="675" type="stmt" count="0"/>
16532
+ <line num="677" type="stmt" count="0"/>
 
16533
  <line num="684" type="stmt" count="0"/>
16534
+ <line num="685" type="stmt" count="0"/>
16535
+ <line num="686" type="stmt" count="0"/>
16536
+ <line num="687" type="stmt" count="0"/>
16537
+ <line num="694" type="method" name="run" visibility="public" complexity="1" crap="2" count="0"/>
16538
  <line num="695" type="stmt" count="0"/>
16539
+ <line num="696" type="stmt" count="0"/>
16540
+ <line num="705" type="method" name="get_plugin_name" visibility="public" complexity="1" crap="2" count="0"/>
16541
+ <line num="706" type="stmt" count="0"/>
16542
+ <line num="707" type="stmt" count="0"/>
16543
+ <line num="715" type="method" name="get_loader" visibility="public" complexity="1" crap="2" count="0"/>
16544
+ <line num="716" type="stmt" count="0"/>
16545
+ <line num="717" type="stmt" count="0"/>
16546
+ <line num="725" type="method" name="get_version" visibility="public" complexity="1" crap="2" count="0"/>
16547
+ <line num="726" type="stmt" count="0"/>
16548
+ <line num="727" type="stmt" count="0"/>
16549
+ <metrics loc="728" ncloc="457" classes="1" methods="9" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="350" coveredstatements="0" elements="359" coveredelements="0"/>
16550
  </file>
16551
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/config/config.cron.php">
16552
  <line num="17" type="stmt" count="1"/>
16572
  <line num="62" type="stmt" count="1"/>
16573
  <line num="64" type="stmt" count="1"/>
16574
  <line num="65" type="stmt" count="1"/>
 
 
16575
  <line num="69" type="stmt" count="1"/>
16576
+ <line num="70" type="stmt" count="1"/>
16577
  <line num="71" type="stmt" count="1"/>
16578
+ <line num="73" type="stmt" count="1"/>
16579
+ <line num="74" type="stmt" count="1"/>
16580
+ <line num="75" type="stmt" count="1"/>
16581
+ <line num="76" type="stmt" count="1"/>
16582
+ <line num="78" type="stmt" count="1"/>
16583
+ <line num="80" type="stmt" count="1"/>
16584
+ <metrics loc="80" ncloc="50" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="32" coveredstatements="29" elements="32" coveredelements="29"/>
16585
  </file>
16586
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/config/config.plugin.php">
16587
  <line num="17" type="stmt" count="1"/>
16875
  <metrics loc="185" ncloc="118" classes="1" methods="5" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="75" coveredstatements="39" elements="80" coveredelements="42"/>
16876
  </file>
16877
  </package>
16878
+ <package name="Boldgrid\Backup\Utility">
16879
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/utility/class-remote.php">
16880
+ <class name="Remote" namespace="Boldgrid\Backup\Utility">
16881
+ <metrics complexity="7" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="37" coveredstatements="0" elements="39" coveredelements="0"/>
16882
  </class>
16883
+ <line num="26" type="method" name="get_json" visibility="public" complexity="2" crap="6" count="0"/>
16884
+ <line num="27" type="stmt" count="0"/>
16885
+ <line num="30" type="stmt" count="0"/>
16886
+ <line num="31" type="stmt" count="0"/>
16887
+ <line num="32" type="stmt" count="0"/>
16888
+ <line num="34" type="stmt" count="0"/>
16889
+ <line num="35" type="stmt" count="0"/>
16890
+ <line num="37" type="stmt" count="0"/>
16891
+ <line num="38" type="stmt" count="0"/>
16892
+ <line num="43" type="method" name="save_file" visibility="public" complexity="5" crap="30" count="0"/>
16893
+ <line num="44" type="stmt" count="0"/>
16894
+ <line num="46" type="stmt" count="0"/>
16895
+ <line num="47" type="stmt" count="0"/>
16896
+ <line num="48" type="stmt" count="0"/>
16897
+ <line num="49" type="stmt" count="0"/>
16898
+ <line num="50" type="stmt" count="0"/>
16899
  <line num="52" type="stmt" count="0"/>
16900
+ <line num="53" type="stmt" count="0"/>
16901
+ <line num="54" type="stmt" count="0"/>
16902
+ <line num="55" type="stmt" count="0"/>
16903
+ <line num="56" type="stmt" count="0"/>
16904
+ <line num="58" type="stmt" count="0"/>
16905
  <line num="59" type="stmt" count="0"/>
16906
+ <line num="60" type="stmt" count="0"/>
16907
+ <line num="61" type="stmt" count="0"/>
16908
+ <line num="62" type="stmt" count="0"/>
16909
+ <line num="63" type="stmt" count="0"/>
16910
+ <line num="64" type="stmt" count="0"/>
16911
+ <line num="65" type="stmt" count="0"/>
16912
  <line num="66" type="stmt" count="0"/>
16913
+ <line num="67" type="stmt" count="0"/>
16914
+ <line num="69" type="stmt" count="0"/>
16915
+ <line num="70" type="stmt" count="0"/>
16916
+ <line num="71" type="stmt" count="0"/>
16917
+ <line num="73" type="stmt" count="0"/>
16918
+ <line num="74" type="stmt" count="0"/>
16919
+ <line num="75" type="stmt" count="0"/>
16920
+ <line num="77" type="stmt" count="0"/>
16921
+ <line num="78" type="stmt" count="0"/>
16922
+ <metrics loc="79" ncloc="54" classes="1" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="37" coveredstatements="0" elements="39" coveredelements="0"/>
16923
+ </file>
16924
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/utility/class-virtual-folder.php">
16925
+ <class name="Virtual_Folder" namespace="Boldgrid\Backup\Utility" fullPackage="Virtual">
16926
+ <metrics complexity="4" methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="11" coveredstatements="3" elements="15" coveredelements="4"/>
16927
+ </class>
16928
+ <line num="27" type="method" name="get_by_id" visibility="public" complexity="1" crap="2" count="0"/>
16929
+ <line num="28" type="stmt" count="0"/>
16930
+ <line num="30" type="stmt" count="0"/>
16931
+ <line num="41" type="method" name="folder_by_zip" visibility="public" complexity="1" crap="1" count="4"/>
16932
+ <line num="42" type="stmt" count="4"/>
16933
+ <line num="44" type="stmt" count="4"/>
16934
+ <line num="46" type="stmt" count="4"/>
16935
+ <line num="56" type="method" name="path_by_id" visibility="public" complexity="1" crap="2" count="0"/>
16936
+ <line num="57" type="stmt" count="0"/>
16937
+ <line num="59" type="stmt" count="0"/>
16938
+ <line num="61" type="stmt" count="0"/>
16939
+ <line num="77" type="method" name="zip_by_folder" visibility="public" complexity="1" crap="2" count="0"/>
16940
+ <line num="78" type="stmt" count="0"/>
16941
+ <line num="80" type="stmt" count="0"/>
16942
+ <line num="82" type="stmt" count="0"/>
16943
+ <metrics loc="84" ncloc="37" classes="1" methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="11" coveredstatements="3" elements="15" coveredelements="4"/>
16944
+ </file>
16945
+ </package>
16946
+ <package name="Boldgrid\Backup\V2\Archive">
16947
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-archive.php">
16948
+ <class name="Archive" namespace="Boldgrid\Backup\V2\Archive">
16949
+ <metrics complexity="9" methods="8" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="16" coveredstatements="10" elements="24" coveredelements="12"/>
16950
+ </class>
16951
+ <line num="49" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="4"/>
16952
+ <line num="50" type="stmt" count="4"/>
16953
+ <line num="51" type="stmt" count="4"/>
16954
+ <line num="56" type="method" name="get_dir" visibility="public" complexity="1" crap="2" count="0"/>
16955
+ <line num="57" type="stmt" count="0"/>
16956
+ <line num="63" type="method" name="get_dirlist" visibility="public" complexity="1" crap="2" count="0"/>
16957
+ <line num="64" type="stmt" count="0"/>
16958
+ <line num="70" type="method" name="get_file" visibility="public" complexity="1" crap="2" count="0"/>
16959
+ <line num="71" type="stmt" count="0"/>
16960
+ <line num="77" type="method" name="get_folder" visibility="public" complexity="1" crap="2" count="0"/>
16961
+ <line num="78" type="stmt" count="0"/>
16962
+ <line num="84" type="method" name="get_id" visibility="public" complexity="1" crap="2" count="0"/>
16963
+ <line num="85" type="stmt" count="0"/>
16964
+ <line num="91" type="method" name="set_dir" visibility="public" complexity="1" crap="1" count="4"/>
16965
+ <line num="92" type="stmt" count="4"/>
16966
+ <line num="94" type="stmt" count="4"/>
16967
+ <line num="95" type="stmt" count="4"/>
16968
+ <line num="100" type="method" name="set_filename" visibility="public" complexity="2" crap="2.02" count="4"/>
16969
+ <line num="102" type="stmt" count="4"/>
16970
+ <line num="103" type="stmt" count="4"/>
16971
+ <line num="104" type="stmt" count="0"/>
16972
+ <line num="106" type="stmt" count="4"/>
16973
+ <line num="108" type="stmt" count="4"/>
16974
+ <line num="109" type="stmt" count="4"/>
16975
+ <metrics loc="110" ncloc="54" classes="1" methods="8" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="16" coveredstatements="10" elements="24" coveredelements="12"/>
16976
  </file>
16977
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-dirlist.php">
16978
  <class name="Dirlist" namespace="Boldgrid\Backup\V2\Archive">
16979
+ <metrics complexity="10" methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="25" coveredstatements="3" elements="29" coveredelements="4"/>
16980
  </class>
16981
  <line num="33" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="4"/>
16982
  <line num="34" type="stmt" count="4"/>
16983
  <line num="35" type="stmt" count="4"/>
16984
  <line num="36" type="stmt" count="4"/>
16985
+ <line num="41" type="method" name="get" visibility="public" complexity="2" crap="6" count="0"/>
16986
  <line num="42" type="stmt" count="0"/>
16987
+ <line num="44" type="stmt" count="0"/>
16988
  <line num="46" type="stmt" count="0"/>
16989
+ <line num="47" type="stmt" count="0"/>
16990
  <line num="48" type="stmt" count="0"/>
 
16991
  <line num="50" type="stmt" count="0"/>
16992
+ <line num="53" type="method" name="get_by_extension" visibility="public" complexity="3" crap="12" count="0"/>
16993
+ <line num="54" type="stmt" count="0"/>
16994
+ <line num="56" type="stmt" count="0"/>
16995
+ <line num="57" type="stmt" count="0"/>
16996
+ <line num="58" type="stmt" count="0"/>
16997
+ <line num="59" type="stmt" count="0"/>
16998
+ <line num="60" type="stmt" count="0"/>
16999
+ <line num="61" type="stmt" count="0"/>
17000
+ <line num="63" type="stmt" count="0"/>
17001
+ <line num="69" type="method" name="get_by_key" visibility="public" complexity="4" crap="20" count="0"/>
17002
+ <line num="70" type="stmt" count="0"/>
17003
+ <line num="72" type="stmt" count="0"/>
17004
+ <line num="73" type="stmt" count="0"/>
17005
+ <line num="74" type="stmt" count="0"/>
17006
+ <line num="75" type="stmt" count="0"/>
17007
+ <line num="76" type="stmt" count="0"/>
17008
+ <line num="77" type="stmt" count="0"/>
17009
+ <line num="79" type="stmt" count="0"/>
17010
+ <metrics loc="81" ncloc="52" classes="1" methods="4" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="25" coveredstatements="3" elements="29" coveredelements="4"/>
17011
  </file>
17012
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-factory.php">
17013
  <class name="Factory" namespace="Boldgrid\Backup\V2\Archive">
17026
  <line num="43" type="stmt" count="4"/>
17027
  <metrics loc="45" ncloc="22" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="8" elements="11" coveredelements="8"/>
17028
  </file>
17029
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archive/class-file.php">
17030
+ <class name="File" namespace="Boldgrid\Backup\V2\Archive">
17031
+ <metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="10" coveredelements="0"/>
17032
+ </class>
17033
+ <line num="37" type="method" name="__construct" visibility="public" complexity="1" crap="2" count="0"/>
17034
+ <line num="38" type="stmt" count="0"/>
17035
+ <line num="39" type="stmt" count="0"/>
17036
+ <line num="40" type="stmt" count="0"/>
17037
+ <line num="42" type="stmt" count="0"/>
17038
+ <line num="43" type="stmt" count="0"/>
17039
+ <line num="44" type="stmt" count="0"/>
17040
+ <line num="49" type="method" name="send" visibility="public" complexity="1" crap="2" count="0"/>
17041
+ <line num="50" type="stmt" count="0"/>
17042
+ <line num="51" type="stmt" count="0"/>
17043
+ <metrics loc="52" ncloc="26" classes="1" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="10" coveredelements="0"/>
17044
+ </file>
17045
  </package>
17046
  <package name="Boldgrid\Backup\V2\Archiver">
17047
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/archiver/class-archiver.php">
17438
  <metrics loc="77" ncloc="44" classes="1" methods="3" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="22" coveredstatements="22" elements="25" coveredelements="25"/>
17439
  </file>
17440
  </package>
17441
+ <package name="Boldgrid\Backup\V2\Fetcher">
17442
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/class-factory.php">
17443
+ <class name="Factory" namespace="Boldgrid\Backup\V2\Fetcher">
17444
+ <metrics complexity="5" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="20" coveredstatements="0" elements="22" coveredelements="0"/>
17445
+ </class>
17446
+ <line num="30" type="method" name="run" visibility="public" complexity="1" crap="2" count="0"/>
17447
+ <line num="31" type="stmt" count="0"/>
17448
+ <line num="34" type="stmt" count="0"/>
17449
+ <line num="40" type="stmt" count="0"/>
17450
+ <line num="41" type="stmt" count="0"/>
17451
+ <line num="43" type="stmt" count="0"/>
17452
+ <line num="45" type="stmt" count="0"/>
17453
+ <line num="47" type="stmt" count="0"/>
17454
+ <line num="48" type="stmt" count="0"/>
17455
+ <line num="53" type="method" name="run_by_resumer" visibility="public" complexity="4" crap="20" count="0"/>
17456
+ <line num="55" type="stmt" count="0"/>
17457
+ <line num="56" type="stmt" count="0"/>
17458
+ <line num="57" type="stmt" count="0"/>
17459
+ <line num="58" type="stmt" count="0"/>
17460
+ <line num="59" type="stmt" count="0"/>
17461
+ <line num="60" type="stmt" count="0"/>
17462
+ <line num="63" type="stmt" count="0"/>
17463
+ <line num="64" type="stmt" count="0"/>
17464
+ <line num="65" type="stmt" count="0"/>
17465
+ <line num="66" type="stmt" count="0"/>
17466
+ <line num="68" type="stmt" count="0"/>
17467
+ <line num="69" type="stmt" count="0"/>
17468
+ <metrics loc="70" ncloc="35" classes="1" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="20" coveredstatements="0" elements="22" coveredelements="0"/>
17469
+ </file>
17470
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/class-fetcher.php">
17471
+ <class name="Fetcher" namespace="Boldgrid\Backup\V2\Fetcher">
17472
+ <metrics complexity="9" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="44" coveredstatements="0" elements="45" coveredelements="0"/>
17473
+ </class>
17474
+ <line num="28" type="method" name="run" visibility="public" complexity="9" crap="90" count="0"/>
17475
+ <line num="29" type="stmt" count="0"/>
17476
+ <line num="31" type="stmt" count="0"/>
17477
+ <line num="33" type="stmt" count="0"/>
17478
+ <line num="34" type="stmt" count="0"/>
17479
+ <line num="36" type="stmt" count="0"/>
17480
+ <line num="37" type="stmt" count="0"/>
17481
+ <line num="38" type="stmt" count="0"/>
17482
+ <line num="40" type="stmt" count="0"/>
17483
+ <line num="41" type="stmt" count="0"/>
17484
+ <line num="43" type="stmt" count="0"/>
17485
+ <line num="44" type="stmt" count="0"/>
17486
+ <line num="46" type="stmt" count="0"/>
17487
+ <line num="47" type="stmt" count="0"/>
17488
+ <line num="48" type="stmt" count="0"/>
17489
+ <line num="49" type="stmt" count="0"/>
17490
+ <line num="50" type="stmt" count="0"/>
17491
+ <line num="52" type="stmt" count="0"/>
17492
+ <line num="54" type="stmt" count="0"/>
17493
+ <line num="55" type="stmt" count="0"/>
17494
+ <line num="56" type="stmt" count="0"/>
17495
+ <line num="57" type="stmt" count="0"/>
17496
+ <line num="59" type="stmt" count="0"/>
17497
+ <line num="60" type="stmt" count="0"/>
17498
+ <line num="61" type="stmt" count="0"/>
17499
+ <line num="63" type="stmt" count="0"/>
17500
+ <line num="64" type="stmt" count="0"/>
17501
+ <line num="65" type="stmt" count="0"/>
17502
+ <line num="66" type="stmt" count="0"/>
17503
+ <line num="68" type="stmt" count="0"/>
17504
+ <line num="69" type="stmt" count="0"/>
17505
+ <line num="71" type="stmt" count="0"/>
17506
+ <line num="73" type="stmt" count="0"/>
17507
+ <line num="74" type="stmt" count="0"/>
17508
+ <line num="76" type="stmt" count="0"/>
17509
+ <line num="77" type="stmt" count="0"/>
17510
+ <line num="79" type="stmt" count="0"/>
17511
+ <line num="80" type="stmt" count="0"/>
17512
+ <line num="81" type="stmt" count="0"/>
17513
+ <line num="82" type="stmt" count="0"/>
17514
+ <line num="83" type="stmt" count="0"/>
17515
+ <line num="85" type="stmt" count="0"/>
17516
+ <line num="87" type="stmt" count="0"/>
17517
+ <line num="89" type="stmt" count="0"/>
17518
+ <line num="90" type="stmt" count="0"/>
17519
+ <metrics loc="91" ncloc="70" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="44" coveredstatements="0" elements="45" coveredelements="0"/>
17520
+ </file>
17521
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/class-resumer.php">
17522
+ <class name="Resumer" namespace="Boldgrid\Backup\V2\Fetcher">
17523
+ <metrics complexity="10" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="37" coveredstatements="0" elements="43" coveredelements="0"/>
17524
+ </class>
17525
+ <line num="27" type="method" name="__construct" visibility="public" complexity="2" crap="6" count="0"/>
17526
+ <line num="28" type="stmt" count="0"/>
17527
+ <line num="29" type="stmt" count="0"/>
17528
+ <line num="34" type="method" name="add_cron_command" visibility="private" complexity="1" crap="2" count="0"/>
17529
+ <line num="35" type="stmt" count="0"/>
17530
+ <line num="37" type="stmt" count="0"/>
17531
+ <line num="38" type="stmt" count="0"/>
17532
+ <line num="43" type="method" name="get_cron_command" visibility="private" complexity="1" crap="2" count="0"/>
17533
+ <line num="44" type="stmt" count="0"/>
17534
+ <line num="45" type="stmt" count="0"/>
17535
+ <line num="46" type="stmt" count="0"/>
17536
+ <line num="47" type="stmt" count="0"/>
17537
+ <line num="48" type="stmt" count="0"/>
17538
+ <line num="49" type="stmt" count="0"/>
17539
+ <line num="50" type="stmt" count="0"/>
17540
+ <line num="51" type="stmt" count="0"/>
17541
+ <line num="52" type="stmt" count="0"/>
17542
+ <line num="54" type="stmt" count="0"/>
17543
+ <line num="55" type="stmt" count="0"/>
17544
+ <line num="60" type="method" name="maybe_add_cron" visibility="public" complexity="2" crap="6" count="0"/>
17545
+ <line num="61" type="stmt" count="0"/>
17546
+ <line num="62" type="stmt" count="0"/>
17547
+ <line num="64" type="stmt" count="0"/>
17548
+ <line num="65" type="stmt" count="0"/>
17549
+ <line num="66" type="stmt" count="0"/>
17550
+ <line num="67" type="stmt" count="0"/>
17551
+ <line num="72" type="method" name="remove_cron" visibility="public" complexity="1" crap="2" count="0"/>
17552
+ <line num="73" type="stmt" count="0"/>
17553
+ <line num="75" type="stmt" count="0"/>
17554
+ <line num="76" type="stmt" count="0"/>
17555
+ <line num="81" type="method" name="run" visibility="public" complexity="3" crap="12" count="0"/>
17556
+ <line num="82" type="stmt" count="0"/>
17557
+ <line num="83" type="stmt" count="0"/>
17558
+ <line num="84" type="stmt" count="0"/>
17559
+ <line num="85" type="stmt" count="0"/>
17560
+ <line num="86" type="stmt" count="0"/>
17561
+ <line num="88" type="stmt" count="0"/>
17562
+ <line num="89" type="stmt" count="0"/>
17563
+ <line num="90" type="stmt" count="0"/>
17564
+ <line num="91" type="stmt" count="0"/>
17565
+ <line num="92" type="stmt" count="0"/>
17566
+ <line num="93" type="stmt" count="0"/>
17567
+ <line num="94" type="stmt" count="0"/>
17568
+ <metrics loc="95" ncloc="61" classes="1" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="37" coveredstatements="0" elements="43" coveredelements="0"/>
17569
+ </file>
17570
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/class-utility.php">
17571
+ <class name="Utility" namespace="Boldgrid\Backup\V2\Fetcher">
17572
+ <metrics complexity="3" methods="3" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="11" coveredelements="0"/>
17573
+ </class>
17574
+ <line num="25" type="method" name="get_folder_name" visibility="public" complexity="1" crap="2" count="0"/>
17575
+ <line num="26" type="stmt" count="0"/>
17576
+ <line num="27" type="stmt" count="0"/>
17577
+ <line num="32" type="method" name="get_option" visibility="public" complexity="1" crap="2" count="0"/>
17578
+ <line num="33" type="stmt" count="0"/>
17579
+ <line num="34" type="stmt" count="0"/>
17580
+ <line num="39" type="method" name="path_by_id" visibility="public" complexity="1" crap="2" count="0"/>
17581
+ <line num="41" type="stmt" count="0"/>
17582
+ <line num="44" type="stmt" count="0"/>
17583
+ <line num="47" type="stmt" count="0"/>
17584
+ <line num="48" type="stmt" count="0"/>
17585
+ <metrics loc="49" ncloc="18" classes="1" methods="3" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="11" coveredelements="0"/>
17586
+ </file>
17587
+ </package>
17588
+ <package name="Boldgrid\Backup\V2\Fetcher\Steps">
17589
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/steps/class-complete.php">
17590
+ <class name="Complete" namespace="Boldgrid\Backup\V2\Fetcher\Steps">
17591
+ <metrics complexity="2" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="9" coveredelements="0"/>
17592
+ </class>
17593
+ <line num="27" type="method" name="run" visibility="public" complexity="2" crap="6" count="0"/>
17594
+ <line num="28" type="stmt" count="0"/>
17595
+ <line num="36" type="stmt" count="0"/>
17596
+ <line num="37" type="stmt" count="0"/>
17597
+ <line num="38" type="stmt" count="0"/>
17598
+ <line num="39" type="stmt" count="0"/>
17599
+ <line num="41" type="stmt" count="0"/>
17600
+ <line num="43" type="stmt" count="0"/>
17601
+ <line num="44" type="stmt" count="0"/>
17602
+ <metrics loc="45" ncloc="18" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="9" coveredelements="0"/>
17603
+ </file>
17604
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/steps/class-discovery.php">
17605
+ <class name="Discovery" namespace="Boldgrid\Backup\V2\Fetcher\Steps">
17606
+ <metrics complexity="7" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="31" coveredstatements="0" elements="33" coveredelements="0"/>
17607
+ </class>
17608
+ <line num="29" type="method" name="run" visibility="public" complexity="4" crap="20" count="0"/>
17609
+ <line num="30" type="stmt" count="0"/>
17610
+ <line num="32" type="stmt" count="0"/>
17611
+ <line num="35" type="stmt" count="0"/>
17612
+ <line num="36" type="stmt" count="0"/>
17613
+ <line num="37" type="stmt" count="0"/>
17614
+ <line num="38" type="stmt" count="0"/>
17615
+ <line num="39" type="stmt" count="0"/>
17616
+ <line num="40" type="stmt" count="0"/>
17617
+ <line num="43" type="stmt" count="0"/>
17618
+ <line num="44" type="stmt" count="0"/>
17619
+ <line num="45" type="stmt" count="0"/>
17620
+ <line num="46" type="stmt" count="0"/>
17621
+ <line num="47" type="stmt" count="0"/>
17622
+ <line num="49" type="stmt" count="0"/>
17623
+ <line num="50" type="stmt" count="0"/>
17624
+ <line num="51" type="stmt" count="0"/>
17625
+ <line num="54" type="stmt" count="0"/>
17626
+ <line num="55" type="stmt" count="0"/>
17627
+ <line num="56" type="stmt" count="0"/>
17628
+ <line num="58" type="stmt" count="0"/>
17629
+ <line num="60" type="stmt" count="0"/>
17630
+ <line num="61" type="stmt" count="0"/>
17631
+ <line num="70" type="method" name="move_working_dir" visibility="private" complexity="3" crap="12" count="0"/>
17632
+ <line num="72" type="stmt" count="0"/>
17633
+ <line num="73" type="stmt" count="0"/>
17634
+ <line num="74" type="stmt" count="0"/>
17635
+ <line num="75" type="stmt" count="0"/>
17636
+ <line num="76" type="stmt" count="0"/>
17637
+ <line num="77" type="stmt" count="0"/>
17638
+ <line num="79" type="stmt" count="0"/>
17639
+ <line num="81" type="stmt" count="0"/>
17640
+ <line num="82" type="stmt" count="0"/>
17641
+ <metrics loc="83" ncloc="45" classes="1" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="31" coveredstatements="0" elements="33" coveredelements="0"/>
17642
+ </file>
17643
+ <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/fetcher/steps/class-fetch.php">
17644
+ <class name="Fetch" namespace="Boldgrid\Backup\V2\Fetcher\Steps">
17645
+ <metrics complexity="5" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="24" coveredstatements="0" elements="28" coveredelements="0"/>
17646
+ </class>
17647
+ <line num="35" type="method" name="run" visibility="public" complexity="2" crap="6" count="0"/>
17648
+ <line num="36" type="stmt" count="0"/>
17649
+ <line num="38" type="stmt" count="0"/>
17650
+ <line num="39" type="stmt" count="0"/>
17651
+ <line num="40" type="stmt" count="0"/>
17652
+ <line num="42" type="stmt" count="0"/>
17653
+ <line num="44" type="stmt" count="0"/>
17654
+ <line num="46" type="stmt" count="0"/>
17655
+ <line num="48" type="stmt" count="0"/>
17656
+ <line num="50" type="stmt" count="0"/>
17657
+ <line num="51" type="stmt" count="0"/>
17658
+ <line num="52" type="stmt" count="0"/>
17659
+ <line num="53" type="stmt" count="0"/>
17660
+ <line num="55" type="stmt" count="0"/>
17661
+ <line num="57" type="stmt" count="0"/>
17662
+ <line num="58" type="stmt" count="0"/>
17663
+ <line num="59" type="stmt" count="0"/>
17664
+ <line num="60" type="stmt" count="0"/>
17665
+ <line num="61" type="stmt" count="0"/>
17666
+ <line num="66" type="method" name="set_backup_filename" visibility="public" complexity="1" crap="2" count="0"/>
17667
+ <line num="67" type="stmt" count="0"/>
17668
+ <line num="68" type="stmt" count="0"/>
17669
+ <line num="73" type="method" name="set_backup_size" visibility="public" complexity="1" crap="2" count="0"/>
17670
+ <line num="74" type="stmt" count="0"/>
17671
+ <line num="75" type="stmt" count="0"/>
17672
+ <line num="80" type="method" name="set_url" visibility="public" complexity="1" crap="2" count="0"/>
17673
+ <line num="81" type="stmt" count="0"/>
17674
+ <line num="82" type="stmt" count="0"/>
17675
+ <metrics loc="83" ncloc="53" classes="1" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="24" coveredstatements="0" elements="28" coveredelements="0"/>
17676
+ </file>
17677
+ </package>
17678
  <package name="Boldgrid\Backup\V2\Filelist">
17679
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/filelist/class-create.php">
17680
  <class name="Create" namespace="Boldgrid\Backup\V2\Filelist">
17944
  </file>
17945
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/v2/step/class-step.php">
17946
  <class name="Step" namespace="Boldgrid\Backup\V2\Step">
17947
+ <metrics complexity="45" methods="27" coveredmethods="20" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="82" elements="143" coveredelements="102"/>
17948
  </class>
17949
+ <line num="116" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="1"/>
 
17950
  <line num="117" type="stmt" count="1"/>
 
17951
  <line num="119" type="stmt" count="1"/>
17952
+ <line num="120" type="stmt" count="1"/>
17953
  <line num="121" type="stmt" count="1"/>
 
17954
  <line num="123" type="stmt" count="1"/>
 
17955
  <line num="125" type="stmt" count="1"/>
17956
+ <line num="126" type="stmt" count="1"/>
17957
  <line num="128" type="stmt" count="1"/>
17958
+ <line num="129" type="stmt" count="1"/>
17959
+ <line num="136" type="method" name="add_attempt" visibility="public" complexity="1" crap="1" count="1"/>
17960
+ <line num="137" type="stmt" count="1"/>
17961
+ <line num="138" type="stmt" count="1"/>
17962
+ <line num="140" type="stmt" count="1"/>
17963
  <line num="142" type="stmt" count="1"/>
17964
+ <line num="143" type="stmt" count="1"/>
17965
  <line num="144" type="stmt" count="1"/>
17966
+ <line num="145" type="stmt" count="1"/>
17967
  <line num="146" type="stmt" count="1"/>
17968
+ <line num="155" type="method" name="check_in" visibility="public" complexity="2" crap="2" count="1"/>
17969
+ <line num="156" type="stmt" count="1"/>
17970
+ <line num="159" type="stmt" count="1"/>
 
 
17971
  <line num="160" type="stmt" count="1"/>
17972
+ <line num="161" type="stmt" count="1"/>
17973
+ <line num="162" type="stmt" count="1"/>
17974
  <line num="163" type="stmt" count="1"/>
17975
+ <line num="170" type="method" name="complete" visibility="public" complexity="1" crap="1" count="1"/>
17976
+ <line num="171" type="stmt" count="1"/>
17977
+ <line num="172" type="stmt" count="1"/>
17978
+ <line num="174" type="stmt" count="1"/>
 
17979
  <line num="175" type="stmt" count="1"/>
17980
+ <line num="177" type="stmt" count="1"/>
17981
  <line num="178" type="stmt" count="1"/>
17982
+ <line num="180" type="stmt" count="1"/>
17983
  <line num="181" type="stmt" count="1"/>
17984
+ <line num="183" type="stmt" count="1"/>
17985
  <line num="184" type="stmt" count="1"/>
17986
+ <line num="189" type="method" name="fail" visibility="public" complexity="1" crap="2" count="0"/>
17987
+ <line num="190" type="stmt" count="0"/>
17988
+ <line num="191" type="stmt" count="0"/>
17989
+ <line num="193" type="stmt" count="0"/>
 
17990
  <line num="195" type="stmt" count="0"/>
17991
  <line num="197" type="stmt" count="0"/>
17992
+ <line num="198" type="stmt" count="0"/>
17993
+ <line num="207" type="method" name="get_core" visibility="public" complexity="1" crap="1" count="1"/>
17994
+ <line num="208" type="stmt" count="1"/>
17995
+ <line num="218" type="method" name="get_contents" visibility="public" complexity="3" crap="3" count="1"/>
17996
+ <line num="219" type="stmt" count="1"/>
17997
+ <line num="221" type="stmt" count="1"/>
17998
+ <line num="222" type="stmt" count="1"/>
17999
  <line num="223" type="stmt" count="1"/>
18000
+ <line num="224" type="stmt" count="1"/>
18001
  <line num="225" type="stmt" count="1"/>
 
18002
  <line num="227" type="stmt" count="1"/>
18003
+ <line num="240" type="method" name="get_data_type" visibility="public" complexity="1" crap="1" count="1"/>
18004
+ <line num="241" type="stmt" count="1"/>
18005
+ <line num="251" type="method" name="get_dir" visibility="public" complexity="1" crap="1" count="1"/>
18006
+ <line num="252" type="stmt" count="1"/>
18007
+ <line num="258" type="method" name="get_folder" visibility="public" complexity="1" crap="2" count="0"/>
18008
+ <line num="259" type="stmt" count="0"/>
18009
+ <line num="265" type="method" name="get_info" visibility="public" complexity="1" crap="1" count="1"/>
18010
+ <line num="266" type="stmt" count="1"/>
18011
+ <line num="272" type="method" name="get_parent" visibility="public" complexity="1" crap="1" count="1"/>
18012
+ <line num="273" type="stmt" count="1"/>
18013
+ <line num="284" type="method" name="get_path_to" visibility="public" complexity="1" crap="1" count="1"/>
18014
+ <line num="285" type="stmt" count="1"/>
18015
+ <line num="291" type="method" name="get_this" visibility="public" complexity="1" crap="1" count="1"/>
18016
+ <line num="292" type="stmt" count="1"/>
18017
+ <line num="298" type="method" name="get_step" visibility="public" complexity="1" crap="1" count="1"/>
18018
+ <line num="299" type="stmt" count="1"/>
18019
+ <line num="309" type="method" name="is_complete" visibility="public" complexity="1" crap="1" count="1"/>
18020
+ <line num="310" type="stmt" count="1"/>
18021
+ <line num="312" type="stmt" count="1"/>
18022
+ <line num="322" type="method" name="is_fail" visibility="public" complexity="1" crap="1" count="1"/>
18023
+ <line num="323" type="stmt" count="1"/>
18024
+ <line num="325" type="stmt" count="1"/>
18025
+ <line num="335" type="method" name="is_in_progress" visibility="public" complexity="2" crap="2" count="1"/>
 
 
18026
  <line num="336" type="stmt" count="1"/>
18027
+ <line num="339" type="stmt" count="1"/>
18028
+ <line num="349" type="method" name="is_max_attemps" visibility="public" complexity="1" crap="1" count="1"/>
18029
+ <line num="350" type="stmt" count="1"/>
18030
+ <line num="360" type="method" name="is_unresponsive" visibility="public" complexity="2" crap="6" count="0"/>
18031
+ <line num="361" type="stmt" count="0"/>
18032
+ <line num="363" type="stmt" count="0"/>
18033
+ <line num="369" type="method" name="log" visibility="public" complexity="3" crap="3.01" count="1"/>
 
18034
  <line num="370" type="stmt" count="1"/>
18035
+ <line num="371" type="stmt" count="1"/>
18036
+ <line num="373" type="stmt" count="1"/>
18037
+ <line num="374" type="stmt" count="0"/>
18038
+ <line num="377" type="stmt" count="1"/>
18039
  <line num="378" type="stmt" count="1"/>
18040
  <line num="379" type="stmt" count="1"/>
18041
+ <line num="381" type="stmt" count="1"/>
18042
+ <line num="382" type="stmt" count="1"/>
18043
+ <line num="391" type="method" name="maybe_init_logger" visibility="protected" complexity="3" crap="12" count="0"/>
18044
+ <line num="393" type="stmt" count="0"/>
18045
+ <line num="394" type="stmt" count="0"/>
18046
+ <line num="398" type="stmt" count="0"/>
18047
  <line num="399" type="stmt" count="0"/>
18048
+ <line num="400" type="stmt" count="0"/>
18049
  <line num="403" type="stmt" count="0"/>
18050
+ <line num="404" type="stmt" count="0"/>
18051
+ <line num="405" type="stmt" count="0"/>
18052
+ <line num="406" type="stmt" count="0"/>
18053
+ <line num="415" type="method" name="maybe_run" visibility="public" complexity="6" crap="9.16" count="1"/>
18054
+ <line num="417" type="stmt" count="1"/>
18055
+ <line num="418" type="stmt" count="0"/>
18056
  <line num="421" type="stmt" count="1"/>
18057
+ <line num="422" type="stmt" count="0"/>
18058
+ <line num="425" type="stmt" count="1"/>
18059
+ <line num="426" type="stmt" count="0"/>
18060
+ <line num="429" type="stmt" count="1"/>
18061
+ <line num="430" type="stmt" count="0"/>
18062
  <line num="433" type="stmt" count="1"/>
18063
+ <line num="439" type="method" name="move_dir" visibility="public" complexity="4" crap="20" count="0"/>
18064
+ <line num="441" type="stmt" count="0"/>
18065
+ <line num="442" type="stmt" count="0"/>
18066
+ <line num="445" type="stmt" count="0"/>
18067
+ <line num="446" type="stmt" count="0"/>
18068
+ <line num="447" type="stmt" count="0"/>
18069
+ <line num="450" type="stmt" count="0"/>
18070
+ <line num="459" type="stmt" count="0"/>
18071
+ <line num="460" type="stmt" count="0"/>
18072
+ <line num="461" type="stmt" count="0"/>
18073
+ <line num="462" type="stmt" count="0"/>
18074
+ <line num="464" type="stmt" count="0"/>
18075
+ <line num="470" type="method" name="set_dir" visibility="private" complexity="2" crap="2" count="1"/>
18076
+ <line num="471" type="stmt" count="1"/>
18077
+ <line num="472" type="stmt" count="1"/>
18078
+ <line num="473" type="stmt" count="1"/>
18079
+ <line num="475" type="stmt" count="1"/>
18080
+ <line num="476" type="stmt" count="1"/>
18081
+ <line num="477" type="stmt" count="1"/>
18082
+ <line num="478" type="stmt" count="1"/>
18083
+ <line num="479" type="stmt" count="1"/>
18084
+ <line num="490" type="method" name="write_contents" visibility="public" complexity="1" crap="1" count="1"/>
18085
+ <line num="491" type="stmt" count="1"/>
18086
+ <line num="493" type="stmt" count="1"/>
18087
+ <line num="504" type="method" name="write_key" visibility="public" complexity="1" crap="1" count="1"/>
18088
+ <line num="505" type="stmt" count="1"/>
18089
+ <line num="506" type="stmt" count="1"/>
18090
+ <line num="510" type="stmt" count="1"/>
18091
+ <line num="513" type="stmt" count="1"/>
18092
+ <metrics loc="514" ncloc="254" classes="1" methods="27" coveredmethods="20" conditionals="0" coveredconditionals="0" statements="116" coveredstatements="82" elements="143" coveredelements="102"/>
18093
  </file>
18094
  </package>
18095
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/index.php">
74923
  <metrics loc="135" ncloc="76" classes="1" methods="4" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="51" coveredstatements="51" elements="55" coveredelements="55"/>
74924
  </file>
74925
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/tests/bootstrap.php">
74926
+ <line num="181" type="stmt" count="0"/>
 
74927
  <line num="182" type="stmt" count="0"/>
74928
  <line num="184" type="stmt" count="0"/>
74929
+ <line num="186" type="stmt" count="0"/>
74930
+ <line num="187" type="stmt" count="0"/>
74931
+ <metrics loc="189" ncloc="137" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="5" coveredelements="0"/>
74932
  </file>
74933
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/tests/cli/test-class-info.php">
74934
  <class name="Test_Boldgrid_Backup_Cli_Info" namespace="global" fullPackage="Test.Boldgrid.Backup.Cli">
79662
  <metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
79663
  </file>
79664
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
79665
+ <class name="ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb" namespace="Composer\Autoload">
79666
  <metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
79667
  </class>
79668
  <line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
79754
  <metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
79755
  </file>
79756
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
79757
+ <class name="ComposerAutoloaderInit90730180c9c9176dc23f0ffddfb0dbbb" namespace="global">
79758
  <metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
79759
  </class>
79760
  <line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
98999
  <line num="16" type="stmt" count="0"/>
99000
  <metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
99001
  </file>
99002
+ <metrics files="1017" loc="200640" ncloc="121603" classes="923" methods="3865" coveredmethods="441" conditionals="0" coveredconditionals="0" statements="88869" coveredstatements="5567" elements="92734" coveredelements="6008"/>
99003
  </project>
99004
  </coverage>
includes/class-boldgrid-backup-archive-fetcher.php CHANGED
@@ -31,19 +31,6 @@ class Boldgrid_Backup_Archive_Fetcher {
31
  */
32
  public $url;
33
 
34
- /**
35
- * Allowed content types.
36
- *
37
- * @since SINCVERSION
38
- * @access private
39
- * @var array
40
- */
41
- private $allowed_content_types = [
42
- 'application/octet-stream',
43
- 'binary/octet-stream',
44
- 'application/zip',
45
- ];
46
-
47
  /**
48
  * The core class object.
49
  *
@@ -115,7 +102,8 @@ class Boldgrid_Backup_Archive_Fetcher {
115
  public function __construct( $url ) {
116
  $this->core = apply_filters( 'boldgrid_backup_get_core', null );
117
 
118
- $this->url = $url;
 
119
  }
120
 
121
  /**
@@ -126,36 +114,14 @@ class Boldgrid_Backup_Archive_Fetcher {
126
  * @return bool True on success.
127
  */
128
  public function download() {
129
- if ( ! $this->is_valid_url() ) {
130
- $this->error = __( 'Invalid URL address.', 'boldgrid-backup' );
131
- return false;
132
- }
133
 
134
- if ( ! $this->is_valid_backupdir() ) {
135
- $this->error = implode( '<br />', $this->core->backup_dir->errors );
136
- return false;
137
- }
138
-
139
- $this->filepath = $this->core->upload->get_save_path( basename( $this->url ) );
140
-
141
- $this->response = wp_remote_get(
142
- $this->url,
143
- [
144
- 'filename' => $this->filepath,
145
- 'headers' => 'Accept: ' . implode( ', ', $this->allowed_content_types ),
146
- 'sslverify' => false,
147
- 'stream' => true,
148
- 'timeout' => MINUTE_IN_SECONDS * 20,
149
- ]
150
- );
151
-
152
- if ( $this->is_call_successful() ) {
153
  $this->post_successful_download();
154
 
155
  return true;
156
  } else {
157
- $this->core->wp_filesystem->delete( $this->filepath );
158
-
159
  $this->error = __(
160
  'Could not retrieve the remote file. It may not be a ZIP file, or the link is no longer valid.',
161
  'boldgrid-backup'
@@ -198,22 +164,6 @@ class Boldgrid_Backup_Archive_Fetcher {
198
  return ! empty( $this->error );
199
  }
200
 
201
- /**
202
- * Whether or not the call to download the file was successful.
203
- *
204
- * This does not represent the success of the download() method, but instead the state of the
205
- * wp_remote_get call.
206
- *
207
- * @since SINCEVERSION
208
- *
209
- * @return bool True on success.
210
- */
211
- private function is_call_successful() {
212
- return is_array( $this->response ) &&
213
- ! is_wp_error( $this->response ) &&
214
- in_array( $this->response['headers']['content-type'], $this->allowed_content_types, true );
215
- }
216
-
217
  /**
218
  * Validate our backup directory.
219
  *
@@ -227,19 +177,6 @@ class Boldgrid_Backup_Archive_Fetcher {
227
  return $this->core->backup_dir->is_valid( $backup_directory ) && empty( $this->core->backup_dir->errors );
228
  }
229
 
230
- /**
231
- * Validate our download url.
232
- *
233
- * @since SINCEVERSION
234
- *
235
- * @return bool True if valid.
236
- */
237
- private function is_valid_url() {
238
- $url_regex = '/' . $this->core->configs['url_regex'] . '/i';
239
-
240
- return preg_match( $url_regex, $this->url );
241
- }
242
-
243
  /**
244
  * Steps to take if our raw wp_remote_get() call to download the backup was successful.
245
  *
31
  */
32
  public $url;
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  /**
35
  * The core class object.
36
  *
102
  public function __construct( $url ) {
103
  $this->core = apply_filters( 'boldgrid_backup_get_core', null );
104
 
105
+ $this->url = $url;
106
+ $this->filepath = $this->core->upload->get_save_path( basename( $this->url ) );
107
  }
108
 
109
  /**
114
  * @return bool True on success.
115
  */
116
  public function download() {
117
+ // Try to download and save the file.
118
+ $file_saved = Boldgrid\Backup\Utility\Remote::save_file( $this->url, $this->filepath, $this->response );
 
 
119
 
120
+ if ( true === $file_saved ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  $this->post_successful_download();
122
 
123
  return true;
124
  } else {
 
 
125
  $this->error = __(
126
  'Could not retrieve the remote file. It may not be a ZIP file, or the link is no longer valid.',
127
  'boldgrid-backup'
164
  return ! empty( $this->error );
165
  }
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  /**
168
  * Validate our backup directory.
169
  *
177
  return $this->core->backup_dir->is_valid( $backup_directory ) && empty( $this->core->backup_dir->errors );
178
  }
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  /**
181
  * Steps to take if our raw wp_remote_get() call to download the backup was successful.
182
  *
includes/class-boldgrid-backup-download.php CHANGED
@@ -54,14 +54,51 @@ class Boldgrid_Backup_Download {
54
  $token_details = Boldgrid_Backup_Authentication::get_token_details( $token );
55
 
56
  if ( $token_details['is_valid'] ) {
57
- $archive = $this->core->archive->get_by_name( $token_details['id'] );
58
 
59
- if ( ! empty( $archive ) ) {
 
 
60
  // Send file and die nicely.
61
- Boldgrid_Backup_File::send_file( $archive['filepath'], $archive['filesize'] );
62
  }
63
  }
64
 
65
  wp_redirect( get_site_url(), 404 );
66
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
54
  $token_details = Boldgrid_Backup_Authentication::get_token_details( $token );
55
 
56
  if ( $token_details['is_valid'] ) {
57
+ $archive = \Boldgrid\Backup\Archive\Factory::get_by_filename( $token_details['id'] );
58
 
59
+ if ( $archive->is_virtual ) {
60
+ $this->download_virtual( $archive );
61
+ } else {
62
  // Send file and die nicely.
63
+ Boldgrid_Backup_File::send_file( $archive->filepath, $archive->get_filesize() );
64
  }
65
  }
66
 
67
  wp_redirect( get_site_url(), 404 );
68
  }
69
+
70
+ /**
71
+ *
72
+ */
73
+ private function download_virtual( $archive ) {
74
+ // Verification handled by calling method, self::public_download().
75
+ $filename = ! empty( $_GET['filename'] ) ? $_GET['filename'] : null; // phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification
76
+ $zips = $archive->virtual->get_dirlist()->get_by_extension( 'zip' );
77
+
78
+ /*
79
+ * If the user didn't specify a specific filename, we'll send them a list of all the zips they
80
+ * will need to download.
81
+ *
82
+ * Otherwise, they requested a specific file to download.
83
+ */
84
+ if ( empty( $filename ) ) {
85
+ // Only return the filename and size.
86
+ foreach ( $zips as &$zip ) {
87
+ $zip = array(
88
+ 'name' => $zip['name'],
89
+ 'size' => $zip['size'],
90
+ );
91
+ }
92
+
93
+ $return = array(
94
+ 'folder' => $archive->virtual->get_folder(),
95
+ 'zips' => $zips,
96
+ );
97
+
98
+ wp_send_json_success( $return );
99
+ } else {
100
+ $file = $archive->virtual->get_file( $filename );
101
+ $file->send();
102
+ }
103
+ }
104
  }
includes/class-boldgrid-backup.php CHANGED
@@ -107,10 +107,10 @@ class Boldgrid_Backup {
107
  */
108
  require_once BOLDGRID_BACKUP_PATH . '/admin/class-boldgrid-backup-admin.php';
109
 
110
- /**
111
- * Include a utility class.
112
- */
113
  require_once BOLDGRID_BACKUP_PATH . '/admin/class-boldgrid-backup-admin-utility.php';
 
 
114
 
115
  /**
116
  * The class responsible for the configuration of the plugin.
@@ -372,6 +372,16 @@ class Boldgrid_Backup {
372
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-archive.php';
373
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-dirlist.php';
374
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-factory.php';
 
 
 
 
 
 
 
 
 
 
375
 
376
  $this->loader = new Boldgrid_Backup_Loader();
377
  }
@@ -407,6 +417,7 @@ class Boldgrid_Backup {
407
  $plugin_admin_core = new Boldgrid_Backup_Admin_Core();
408
  $resumer = new \Boldgrid\Backup\V2\Archiver\Resumer( $plugin_admin_core );
409
  $restore_resumer = new \Boldgrid\Backup\V2\Restorer\Resumer( $plugin_admin_core );
 
410
 
411
  // WP-CLI support.
412
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
@@ -578,6 +589,7 @@ class Boldgrid_Backup {
578
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_restore', $plugin_admin_core->cron, 'restore' );
579
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_resume', $resumer, 'run' );
580
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_resume_restore', $restore_resumer, 'run' );
 
581
 
582
  // For public downloads.
583
  $this->loader->add_action( 'wp_ajax_boldgrid_backup_download', $plugin_admin_core->download, 'public_download' );
107
  */
108
  require_once BOLDGRID_BACKUP_PATH . '/admin/class-boldgrid-backup-admin.php';
109
 
110
+ // Utility classes.
 
 
111
  require_once BOLDGRID_BACKUP_PATH . '/admin/class-boldgrid-backup-admin-utility.php';
112
+ require_once BOLDGRID_BACKUP_PATH . '/includes/utility/class-remote.php';
113
+ require_once BOLDGRID_BACKUP_PATH . '/includes/utility/class-virtual-folder.php';
114
 
115
  /**
116
  * The class responsible for the configuration of the plugin.
372
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-archive.php';
373
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-dirlist.php';
374
  require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-factory.php';
375
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/archive/class-file.php';
376
+
377
+ // V2 Fetcher.
378
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/class-fetcher.php';
379
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/class-factory.php';
380
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/class-utility.php';
381
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/class-resumer.php';
382
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/steps/class-discovery.php';
383
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/steps/class-fetch.php';
384
+ require_once BOLDGRID_BACKUP_PATH . '/includes/v2/fetcher/steps/class-complete.php';
385
 
386
  $this->loader = new Boldgrid_Backup_Loader();
387
  }
417
  $plugin_admin_core = new Boldgrid_Backup_Admin_Core();
418
  $resumer = new \Boldgrid\Backup\V2\Archiver\Resumer( $plugin_admin_core );
419
  $restore_resumer = new \Boldgrid\Backup\V2\Restorer\Resumer( $plugin_admin_core );
420
+ $fetch_resumer = new \Boldgrid\Backup\V2\Fetcher\Resumer( $plugin_admin_core );
421
 
422
  // WP-CLI support.
423
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
589
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_restore', $plugin_admin_core->cron, 'restore' );
590
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_resume', $resumer, 'run' );
591
  $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_resume_restore', $restore_resumer, 'run' );
592
+ $this->loader->add_action( 'wp_ajax_nopriv_boldgrid_backup_run_resume_fetch', $fetch_resumer, 'run' );
593
 
594
  // For public downloads.
595
  $this->loader->add_action( 'wp_ajax_boldgrid_backup_download', $plugin_admin_core->download, 'public_download' );
includes/config/config.cron.php CHANGED
@@ -63,6 +63,15 @@ $config = [
63
  // todo add wp-cron
64
  ],
65
  ],
 
 
 
 
 
 
 
 
 
66
  ],
67
  ];
68
 
63
  // todo add wp-cron
64
  ],
65
  ],
66
+ 'resume_fetch' => [
67
+ 'search' => [
68
+ 'cron' => [
69
+ 'mode=resume_fetch ',
70
+ 'siteurl=' . $site_url . ' ',
71
+ ],
72
+ // todo add wp-cron
73
+ ],
74
+ ],
75
  ],
76
  ];
77
 
includes/utility/class-remote.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Utility Remove class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\Utility;
15
+
16
+ /**
17
+ * Class: Remote
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Remote {
22
+ /**
23
+ *
24
+ * @return boolean
25
+ */
26
+ public static function get_json( $url ) {
27
+ $request = wp_remote_get( $url );
28
+
29
+ // If we have an error, return that now. No further processing needed.
30
+ if ( is_wp_error( $request ) ) {
31
+ return $request;
32
+ }
33
+
34
+ $body = wp_remote_retrieve_body( $request );
35
+ $data = json_decode( $body, true );
36
+
37
+ return $data;
38
+ }
39
+
40
+ /**
41
+ *
42
+ */
43
+ public static function save_file( $source, $destination, &$response = null ) {
44
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
45
+
46
+ $allowed_content_types = [
47
+ 'application/octet-stream',
48
+ 'binary/octet-stream',
49
+ 'application/zip',
50
+ ];
51
+
52
+ $url_regex = '/' . $core->configs['url_regex'] . '/i';
53
+ $is_value_url = preg_match( $url_regex, $source );
54
+ if ( ! $is_value_url ) {
55
+ return __( 'Invalid URL address.', 'boldgrid-backup' );
56
+ }
57
+
58
+ $response = wp_remote_get(
59
+ $source,
60
+ [
61
+ 'filename' => $destination,
62
+ 'headers' => 'Accept: ' . implode( ', ', $allowed_content_types ),
63
+ 'sslverify' => false,
64
+ 'stream' => true,
65
+ 'timeout' => MINUTE_IN_SECONDS * 20,
66
+ ]
67
+ );
68
+
69
+ $success = is_array( $response ) &&
70
+ ! is_wp_error( $response ) &&
71
+ in_array( $response['headers']['content-type'], $allowed_content_types, true );
72
+
73
+ if ( ! $success ) {
74
+ $core->wp_filesystem->delete( $destination );
75
+ }
76
+
77
+ return $success;
78
+ }
79
+ }
includes/utility/class-virtual-folder.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Utility Remove class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\Utility;
15
+
16
+ /**
17
+ * Class: Remote
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Virtual_Folder {
22
+ public static $base = 'boldgrid-backup';
23
+
24
+ /**
25
+ *
26
+ */
27
+ public static function get_by_id( $id ) {
28
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
29
+
30
+ return self::$base . '-' . $core->get_backup_identifier() . '-' . $id;
31
+ }
32
+
33
+ /**
34
+ * Pass in a zip filename, either:
35
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-abcd.zip
36
+ * # boldgrid-backup-1234-abcd.zip
37
+ *
38
+ * And get the path to the virtual folder:
39
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-abcd
40
+ */
41
+ public static function folder_by_zip( $zip_filename ) {
42
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
43
+
44
+ $folder_name = wp_basename( $zip_filename, '.zip' );
45
+
46
+ return $core->backup_dir->get_path_to( $folder_name );
47
+ }
48
+
49
+ /**
50
+ * Pass a backup id, such as:
51
+ * # 12345678
52
+ *
53
+ * Get
54
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-12345678/
55
+ */
56
+ public static function path_by_id( $id ) {
57
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
58
+
59
+ $folder_name = self::get_by_id( $id );
60
+
61
+ return trailingslashit( $core->backup_dir->get_path_to( $folder_name ) );
62
+ }
63
+
64
+ /**
65
+ * Create empty zip file based on folder.
66
+ *
67
+ * If you pass in:
68
+ * boldgrid-backup-b8ad717e-908dcb169c3c35cb
69
+ *
70
+ * This method will create:
71
+ * /home/user/boldgrid_backup/boldgrid-backup-b8ad717e-908dcb169c3c35cb.zip
72
+ *
73
+ * @since SINCEVERSION
74
+ *
75
+ * @return bool
76
+ */
77
+ public static function zip_by_folder( $folder ) {
78
+ $core = apply_filters( 'boldgrid_backup_get_core', null );
79
+
80
+ $filepath = $core->backup_dir->get_path_to( $folder . '.zip' );
81
+
82
+ return $core->wp_filesystem->touch( $filepath );
83
+ }
84
+ }
includes/v2/archive/class-archive.php CHANGED
@@ -19,6 +19,9 @@ namespace Boldgrid\Backup\V2\Archive;
19
  * @since SINCEVERSION
20
  */
21
  class Archive {
 
 
 
22
  private $dir;
23
 
24
  /**
@@ -29,6 +32,8 @@ class Archive {
29
 
30
  private $filename;
31
 
 
 
32
  /**
33
  * The id of this backup.
34
  *
@@ -46,7 +51,7 @@ class Archive {
46
  }
47
 
48
  /**
49
- *
50
  */
51
  public function get_dir() {
52
  return $this->dir;
@@ -59,6 +64,20 @@ class Archive {
59
  return $this->dirlist;
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  /**
63
  *
64
  */
@@ -71,6 +90,8 @@ class Archive {
71
  */
72
  public function set_dir( $dir ) {
73
  $this->dir = $dir;
 
 
74
  }
75
 
76
  /**
19
  * @since SINCEVERSION
20
  */
21
  class Archive {
22
+ /**
23
+ * IE /home/user/boldgrid_backup/boldgrid-backup-2cc84b67-8476bbfc0a3f4c5c
24
+ */
25
  private $dir;
26
 
27
  /**
32
 
33
  private $filename;
34
 
35
+ private $folder;
36
+
37
  /**
38
  * The id of this backup.
39
  *
51
  }
52
 
53
  /**
54
+ * The full path to the directory.
55
  */
56
  public function get_dir() {
57
  return $this->dir;
64
  return $this->dirlist;
65
  }
66
 
67
+ /**
68
+ *
69
+ */
70
+ public function get_file( $filename ) {
71
+ return new \Boldgrid\Backup\V2\Archive\File( $this, $filename );
72
+ }
73
+
74
+ /**
75
+ *
76
+ */
77
+ public function get_folder() {
78
+ return $this->folder;
79
+ }
80
+
81
  /**
82
  *
83
  */
90
  */
91
  public function set_dir( $dir ) {
92
  $this->dir = $dir;
93
+
94
+ $this->folder = pathinfo( $dir, PATHINFO_FILENAME );
95
  }
96
 
97
  /**
includes/v2/archive/class-dirlist.php CHANGED
@@ -39,7 +39,15 @@ class Dirlist {
39
  *
40
  */
41
  public function get() {
42
- return $this->core->wp_filesystem->dirlist( $this->archive->get_dir() );
 
 
 
 
 
 
 
 
43
  }
44
 
45
  public function get_by_extension( $extension ) {
@@ -54,4 +62,20 @@ class Dirlist {
54
 
55
  return $files;
56
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
39
  *
40
  */
41
  public function get() {
42
+ $dir = trailingslashit( $this->archive->get_dir() );
43
+
44
+ $dirlist = $this->core->wp_filesystem->dirlist( $dir );
45
+
46
+ foreach ( $dirlist as &$file ) {
47
+ $file['path'] = $dir . $file['name'];
48
+ }
49
+
50
+ return $dirlist;
51
  }
52
 
53
  public function get_by_extension( $extension ) {
62
 
63
  return $files;
64
  }
65
+
66
+ /**
67
+ *
68
+ */
69
+ public function get_by_key( $key, $value ) {
70
+ $files = array();
71
+
72
+ $dirlist = $this->get();
73
+ foreach ( $dirlist as $data ) {
74
+ if ( isset( $data[ $key ] ) && $data[ $key ] === $value ) {
75
+ $files[] = $data;
76
+ }
77
+ }
78
+
79
+ return $files;
80
+ }
81
  }
includes/v2/archive/class-file.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Archive;
15
+
16
+ /**
17
+ * Class: Archive
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class File {
22
+ /**
23
+ *
24
+ * @var Boldgrid\Backup\V2\Archive\Archive
25
+ */
26
+ private $archive;
27
+
28
+ private $core;
29
+
30
+ private $data;
31
+
32
+ private $filename;
33
+
34
+ /**
35
+ *
36
+ */
37
+ public function __construct( $archive, $filename ) {
38
+ $this->core = apply_filters( 'boldgrid_backup_get_core', null );
39
+ $this->archive = $archive;
40
+ $this->filename = $filename;
41
+
42
+ $data = $this->archive->get_dirlist()->get_by_key( 'name', $filename );
43
+ $this->data = $data[0];
44
+ }
45
+
46
+ /**
47
+ *
48
+ */
49
+ public function send() {
50
+ \Boldgrid_Backup_File::send_file( $this->data['path'], $this->data['size'] );
51
+ }
52
+ }
includes/v2/fetcher/class-factory.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fetcher Process Factory class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher;
15
+
16
+ /**
17
+ * Class: Factory
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Factory {
22
+ /**
23
+ *
24
+ */
25
+ private static $id = 'fetcher';
26
+
27
+ /**
28
+ *
29
+ */
30
+ public static function run() {
31
+ $core = apply_filters( 'boldgrid_backup_get_core', false );
32
+
33
+ // Create a 16 digit id for this fetcher process.
34
+ $id = substr( md5( time() ), -16 );
35
+
36
+ /*
37
+ * We need to define the working directory for this fetcher, but we don't know the backup's
38
+ * directory yet. We'll create a temporary one now and fix it later.
39
+ */
40
+ $folder_name = \Boldgrid\Backup\V2\Fetcher\Utility::get_folder_name( $id );
41
+ $tmp_dir = $core->backup_dir->get_path_to( $folder_name );
42
+
43
+ $fetcher = new \Boldgrid\Backup\V2\Fetcher\Fetcher( self::$id, false, $tmp_dir );
44
+
45
+ $fetcher->get_info()->set_key( 'fetcher_id', $id );
46
+
47
+ return $fetcher;
48
+ }
49
+
50
+ /**
51
+ *
52
+ */
53
+ public static function run_by_resumer() {
54
+ // Get our backup id and fetcher id.
55
+ $option = \Boldgrid\Backup\V2\Fetcher\Utility::get_option();
56
+ $backup_id = $option->get_key( 'backup_id' );
57
+ $fetcher_id = $option->get_key( 'fetcher_id' );
58
+ if ( empty( $backup_id ) || empty( $fetcher_id ) ) {
59
+ return false;
60
+ }
61
+
62
+ // Get the full path to our fetcher directory.
63
+ $path = \Boldgrid\Backup\V2\Fetcher\Utility::path_by_id( $backup_id, $fetcher_id );
64
+ if ( empty( $path ) ) {
65
+ return false;
66
+ }
67
+
68
+ return new \Boldgrid\Backup\V2\Fetcher\Fetcher( self::$id, false, $path );
69
+ }
70
+ }
includes/v2/fetcher/class-fetcher.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fetcher class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher;
15
+
16
+ /**
17
+ * Class: Fetcher
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Fetcher extends \Boldgrid\Backup\V2\Step\Step {
22
+
23
+ /**
24
+ * Run the fetching process..
25
+ *
26
+ * @since SINCEVERSION
27
+ */
28
+ public function run() {
29
+ $this->maybe_init_logger( 'transfer-archive-' . time() . '.log' );
30
+
31
+ $this->add_attempt();
32
+
33
+ $resumer = new \Boldgrid\Backup\V2\Fetcher\Resumer();
34
+ $resumer->maybe_add_cron();
35
+
36
+ $steps = array(
37
+ new \Boldgrid\Backup\V2\Fetcher\Steps\Discovery( 'discovery', $this->id, $this->get_dir() ),
38
+ );
39
+
40
+ foreach ( $steps as $step ) {
41
+ $this->check_in();
42
+
43
+ if ( $step->maybe_run() ) {
44
+ $step->run();
45
+
46
+ if ( $step->is_fail() ) {
47
+ return false;
48
+ }
49
+ }
50
+ }
51
+
52
+ $steps = array();
53
+
54
+ $zips = $this->info->get_key( 'zips' );
55
+ if ( empty( $zips ) ) {
56
+ return false;
57
+ }
58
+
59
+ foreach ( $zips as $zip ) {
60
+ $step_name = 'fetch_' . $zip['name'];
61
+ $fetcher = new \Boldgrid\Backup\V2\Fetcher\Steps\Fetch( $step_name, $this->id, $this->get_dir() );
62
+
63
+ $url = $this->info->get_key( 'download_url' ) . '&filename=' . $zip['name'];
64
+ $fetcher->set_url( $url );
65
+ $fetcher->set_backup_filename( $zip['name'] );
66
+ $fetcher->set_backup_size( $zip['size'] );
67
+
68
+ $steps[] = $fetcher;
69
+ }
70
+
71
+ $steps[] = new \Boldgrid\Backup\V2\Fetcher\Steps\Complete( 'complete', $this->id, $this->get_dir() );
72
+
73
+ foreach ( $steps as $step ) {
74
+ $this->check_in();
75
+
76
+ if ( $step->maybe_run() ) {
77
+ $step->run();
78
+
79
+ if ( $step->is_fail() ) {
80
+ return false;
81
+ }
82
+ }
83
+ }
84
+
85
+ $this->complete();
86
+
87
+ $resumer->remove_cron();
88
+
89
+ return true;
90
+ }
91
+ }
includes/v2/fetcher/class-resumer.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Resume class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher;
15
+
16
+ /**
17
+ * Class: Resumer
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Resumer {
22
+ private $core;
23
+
24
+ /**
25
+ *
26
+ */
27
+ public function __construct( $core = null ) {
28
+ $this->core = empty( $core ) ? apply_filters( 'boldgrid_backup_get_core', null ) : $core;
29
+ }
30
+
31
+ /**
32
+ *
33
+ */
34
+ private function add_cron_command() {
35
+ $command = $this->get_cron_command();
36
+
37
+ return $this->core->cron->update_cron( $command );
38
+ }
39
+
40
+ /**
41
+ *
42
+ */
43
+ private function get_cron_command() {
44
+ $command = array(
45
+ '* * * * *',
46
+ $this->core->cron->get_cron_command(),
47
+ '"' . BOLDGRID_BACKUP_PATH . '/boldgrid-backup-cron.php"',
48
+ 'mode=resume_fetch',
49
+ 'siteurl=' . get_site_url(),
50
+ 'id=' . $this->core->get_backup_identifier(),
51
+ 'secret=' . $this->core->cron->get_cron_secret(),
52
+ );
53
+
54
+ return implode( ' ', $command );
55
+ }
56
+
57
+ /**
58
+ *
59
+ */
60
+ public function maybe_add_cron() {
61
+ $cron = new \Boldgrid\Backup\Admin\Cron();
62
+ $entry = $cron->get_entry( 'resume_fetch' );
63
+
64
+ if ( ! $entry->is_set() ) {
65
+ $this->add_cron_command();
66
+ }
67
+ }
68
+
69
+ /**
70
+ *
71
+ */
72
+ public function remove_cron() {
73
+ $command = $this->get_cron_command();
74
+
75
+ return $this->core->cron->entry_delete( $command );
76
+ }
77
+
78
+ /**
79
+ *
80
+ */
81
+ public function run() {
82
+ $fetcher = \Boldgrid\Backup\V2\Fetcher\Factory::run_by_resumer();
83
+ if ( empty( $fetcher ) ) {
84
+ $this->remove_cron();
85
+ return;
86
+ }
87
+
88
+ if ( $fetcher->is_unresponsive() ) {
89
+ $fetcher->log( 'Fetcher resumer: Running, prior process unresponsive.' );
90
+ $fetcher->run();
91
+ } else {
92
+ $fetcher->log( 'Fetcher resumer: Not running, prior process still responsive.' );
93
+ }
94
+ }
95
+ }
includes/v2/fetcher/class-utility.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Utility class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher;
15
+
16
+ /**
17
+ * Class: Utility
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Utility {
22
+ /**
23
+ *
24
+ */
25
+ public static function get_folder_name( $id ) {
26
+ return 'fetcher_' . $id;
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ public static function get_option() {
33
+ return new \Boldgrid\Backup\Option\Option( 'boldgrid_backup_fetcher_data' );
34
+ }
35
+
36
+ /**
37
+ *
38
+ */
39
+ public static function path_by_id( $backup_id, $fetcher_id ) {
40
+ // Get our fetcher folder name, such as "fetcher_1234".
41
+ $folder_name = self::get_folder_name( $fetcher_id );
42
+
43
+ // Get the full path to our backup folder, such as /boldgrid_backup/boldgrid-backup-1234-12345678
44
+ $backup_path = \Boldgrid\Backup\Utility\Virtual_Folder::path_by_id( $backup_id );
45
+
46
+ // Return the full path to our fetcher, such as /boldgrid_backup/boldgrid-backup-1234-12345678/fetcher_1234
47
+ return trailingslashit( $backup_path ) . $folder_name;
48
+ }
49
+ }
includes/v2/fetcher/steps/class-complete.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Complete class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher\Steps;
15
+
16
+ /**
17
+ * Class: Complete.
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Complete extends \Boldgrid\Backup\V2\Step\Step {
22
+ /**
23
+ * Run the complete process (post fetch).
24
+ *
25
+ * @since SINCEVERSION
26
+ */
27
+ public function run() {
28
+ $this->add_attempt();
29
+
30
+ /*
31
+ * We have the folder filed with zips, now we need to create the "virtual" zip.
32
+ *
33
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-abcd/
34
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-abcd.zip
35
+ */
36
+ if ( ! \Boldgrid\Backup\Utility\Virtual_Folder::zip_by_folder( $this->info->get_key( 'backup_folder' ) ) ) {
37
+ $this->fail();
38
+ return false;
39
+ }
40
+
41
+ $this->complete();
42
+
43
+ return true;
44
+ }
45
+ }
includes/v2/fetcher/steps/class-discovery.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Discovery class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher\Steps;
15
+
16
+ /**
17
+ * Class: Discovery
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Discovery extends \Boldgrid\Backup\V2\Step\Step {
22
+ /**
23
+ * Run the discovery scripts.
24
+ *
25
+ * Used to determine which backup files need to be downloaded.
26
+ *
27
+ * @since SINCEVERSION
28
+ */
29
+ public function run() {
30
+ $this->add_attempt();
31
+
32
+ $download_url = $this->info->get_key( 'download_url' );
33
+
34
+ // Get our download data from the remove WordPress site.
35
+ $data = \Boldgrid\Backup\Utility\Remote::get_json( $download_url );
36
+ if ( is_wp_error( $data ) ) {
37
+ return false;
38
+ } elseif ( empty( $data ) ) {
39
+ return false;
40
+ }
41
+
42
+ // Move fetcher process from /fetcher_1234 to /boldgrid-backup-1234-12345678/fetcher_1234
43
+ $backup_folder = \Boldgrid\Backup\Utility\Virtual_Folder::get_by_id( $data['data']['id'] );
44
+ $moved = $this->move_working_dir( $backup_folder );
45
+ if ( ! $moved ) {
46
+ return false;
47
+ }
48
+
49
+ $this->info->set_key( 'zips', $data['data']['zips'] );
50
+ $this->info->set_key( 'backup_folder', $backup_folder );
51
+ $this->info->set_key( 'backup_id', $data['data']['id'] );
52
+
53
+ // Save some in progress data. This is for our fetcher resumer.
54
+ $option = \Boldgrid\Backup\V2\Fetcher\Utility::get_option();
55
+ $option->set_key( 'backup_id', $data['data']['id'] );
56
+ $option->set_key( 'fetcher_id', $this->info->get_key( 'fetcher_id' ) );
57
+
58
+ $this->complete();
59
+
60
+ return true;
61
+ }
62
+
63
+ /**
64
+ * Move our working directory.
65
+ *
66
+ * Now that we have the directory, make the following change:
67
+ * # /home/user/boldgrid_backup/fetcher_1234
68
+ * # /home/user/boldgrid_backup/boldgrid-backup-1234-12345678/fetcher_1234
69
+ */
70
+ private function move_working_dir( $new_folder ) {
71
+ // Make sure the backup folder exist.
72
+ $backup_dir = $this->get_core()->backup_dir->get_path_to( $new_folder );
73
+ if ( ! $this->core->wp_filesystem->exists( $backup_dir ) ) {
74
+ if ( ! $this->core->wp_filesystem->mkdir( $backup_dir ) ) {
75
+ return false;
76
+ }
77
+ }
78
+
79
+ $new_dir = trailingslashit( $backup_dir ) . $this->get_folder();
80
+
81
+ return $this->move_dir( $new_dir );
82
+ }
83
+ }
includes/v2/fetcher/steps/class-fetch.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fetch class.
4
+ *
5
+ * @link https://www.boldgrid.com
6
+ * @since SINCEVERSION
7
+ *
8
+ * @package Boldgrid\Backup
9
+ * @subpackage Boldgrid\Backup\Archive
10
+ * @copyright BoldGrid
11
+ * @author BoldGrid <support@boldgrid.com>
12
+ */
13
+
14
+ namespace Boldgrid\Backup\V2\Fetcher\Steps;
15
+
16
+ /**
17
+ * Class: Fetch.
18
+ *
19
+ * @since SINCEVERSION
20
+ */
21
+ class Fetch extends \Boldgrid\Backup\V2\Step\Step {
22
+ private $url;
23
+
24
+ private $backup_filename;
25
+
26
+ private $backup_size;
27
+
28
+
29
+
30
+ /**
31
+ * Run the fetching process..
32
+ *
33
+ * @since SINCEVERSION
34
+ */
35
+ public function run() {
36
+ $this->add_attempt();
37
+
38
+ $backup_folder = $this->info->get_key( 'backup_folder' );
39
+ $backup_dir = $this->core->backup_dir->get_path_to( $backup_folder );
40
+ $destination = trailingslashit( $backup_dir ) . $this->backup_filename;
41
+
42
+ $this->log( 'Downloading ' . $this->backup_filename );
43
+
44
+ $time_start = microtime( true );
45
+
46
+ $success = \Boldgrid\Backup\Utility\Remote::save_file( $this->url, $destination );
47
+
48
+ $duration = microtime( true ) - $time_start;
49
+
50
+ if ( $success ) {
51
+ $size = $this->core->wp_filesystem->size( $destination );
52
+ $rate = $size / $duration;
53
+ $this->log( size_format( $size, 2 ) . ' downloaded at ' . size_format( $rate, 2 ) . '/s' );
54
+
55
+ $this->complete();
56
+
57
+ return true;
58
+ } else {
59
+ return false;
60
+ }
61
+ }
62
+
63
+ /**
64
+ *
65
+ */
66
+ public function set_backup_filename( $filename ) {
67
+ $this->backup_filename = $filename;
68
+ }
69
+
70
+ /**
71
+ *
72
+ */
73
+ public function set_backup_size( $size ) {
74
+ $this->backup_size = $size;
75
+ }
76
+
77
+ /**
78
+ *
79
+ */
80
+ public function set_url( $url ) {
81
+ $this->url = $url;
82
+ }
83
+ }
includes/v2/step/class-step.php CHANGED
@@ -34,7 +34,7 @@ class Step {
34
  * @access private
35
  * @var Boldgrid_Backup_Admin_Core
36
  */
37
- private $core;
38
 
39
  /**
40
  * Data stored for this step.
@@ -69,6 +69,8 @@ class Step {
69
  */
70
  private $filepath;
71
 
 
 
72
  /**
73
  * The max attempts to execute this step before giving up.
74
  *
@@ -114,21 +116,15 @@ class Step {
114
  public function __construct( $id, $parent_id, $dir ) {
115
  $this->core = apply_filters( 'boldgrid_backup_get_core', false );
116
 
117
- if ( ! $this->core->wp_filesystem->exists( $dir ) ) {
118
- $this->core->wp_filesystem->mkdir( $dir );
119
- }
120
-
121
- $this->id = $id;
122
  $this->parent_id = $parent_id;
123
- $this->dir = trailingslashit( $dir );
124
  $this->filename = 'step-' . $this->id . '.json';
125
- $this->filepath = $this->dir . $this->filename;
 
126
 
127
  $this->data['run'] = new \Boldgrid\Backup\V2\Step\Data( $this, 'run_data' );
128
  $this->data['step'] = new \Boldgrid\Backup\V2\Step\Data( $this, 'step_data' );
129
 
130
- $this->info = new \Boldgrid\Backup\V2\Step\Json_file( $this->get_path_to( 'info.json' ) );
131
-
132
  add_filter( 'boldgrid_backup_get_step_' . $this->id, array( $this, 'get_this' ) );
133
  }
134
 
@@ -256,6 +252,13 @@ class Step {
256
  return $this->dir;
257
  }
258
 
 
 
 
 
 
 
 
259
  /**
260
  *
261
  */
@@ -378,6 +381,30 @@ class Step {
378
  $this->logger->add( 'pid:' . getmypid() . ' step:' . $this->id . ' ' . $message );
379
  }
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  /**
382
  * Determine whether or not we should run this step.
383
  *
@@ -406,6 +433,51 @@ class Step {
406
  return true;
407
  }
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  /**
410
  * Write a file to the step's directory.
411
  *
34
  * @access private
35
  * @var Boldgrid_Backup_Admin_Core
36
  */
37
+ protected $core;
38
 
39
  /**
40
  * Data stored for this step.
69
  */
70
  private $filepath;
71
 
72
+ private $folder;
73
+
74
  /**
75
  * The max attempts to execute this step before giving up.
76
  *
116
  public function __construct( $id, $parent_id, $dir ) {
117
  $this->core = apply_filters( 'boldgrid_backup_get_core', false );
118
 
119
+ $this->id = sanitize_file_name( $id );
 
 
 
 
120
  $this->parent_id = $parent_id;
 
121
  $this->filename = 'step-' . $this->id . '.json';
122
+
123
+ $this->set_dir( $dir );
124
 
125
  $this->data['run'] = new \Boldgrid\Backup\V2\Step\Data( $this, 'run_data' );
126
  $this->data['step'] = new \Boldgrid\Backup\V2\Step\Data( $this, 'step_data' );
127
 
 
 
128
  add_filter( 'boldgrid_backup_get_step_' . $this->id, array( $this, 'get_this' ) );
129
  }
130
 
252
  return $this->dir;
253
  }
254
 
255
+ /**
256
+ *
257
+ */
258
+ public function get_folder() {
259
+ return $this->folder;
260
+ }
261
+
262
  /**
263
  *
264
  */
381
  $this->logger->add( 'pid:' . getmypid() . ' step:' . $this->id . ' ' . $message );
382
  }
383
 
384
+ /**
385
+ * Maybe init our logger.
386
+ *
387
+ * @since SINCEVERSION
388
+ *
389
+ * @param string $filename The filename of our log. IE backup.log
390
+ */
391
+ protected function maybe_init_logger( $filename ) {
392
+ // If we already have a logger, abort.
393
+ if ( ! is_null( $this->logger ) ) {
394
+ return;
395
+ }
396
+
397
+ // If this step already have a log filename, abort.
398
+ $log_filename = $this->info->get_key( 'log_filename' );
399
+ if ( ! empty( $log_filename ) ) {
400
+ return;
401
+ }
402
+
403
+ $this->logger = new \Boldgrid_Backup_Admin_Log( $this->core );
404
+ $this->logger->init( $filename );
405
+ $this->info->set_key( 'log_filename', $filename );
406
+ }
407
+
408
  /**
409
  * Determine whether or not we should run this step.
410
  *
433
  return true;
434
  }
435
 
436
+ /**
437
+ *
438
+ */
439
+ public function move_dir( $new_path ) {
440
+ // If the directories are the same, abort.
441
+ if ( $new_path === $this->dir ) {
442
+ return true;
443
+ }
444
+
445
+ $moved = \Boldgrid_Backup_Admin_Utility::move_dir( $this->dir, $new_path );
446
+ if ( ! $moved ) {
447
+ return false;
448
+ }
449
+
450
+ $this->set_dir( $new_path );
451
+
452
+ /*
453
+ * Update the directory of the parent.
454
+ *
455
+ * Be careful when using this method. It will update the working directory of this step plus
456
+ * the parent step, but that's it. If there are 20 other steps, they won't be updated. This
457
+ * move method is used rarely, and generally would be used the first step.
458
+ */
459
+ $parent = $this->get_parent();
460
+ if ( ! empty( $parent ) ) {
461
+ $parent->set_dir( $new_path );
462
+ }
463
+
464
+ return true;
465
+ }
466
+
467
+ /**
468
+ *
469
+ */
470
+ private function set_dir( $dir ) {
471
+ if ( ! $this->core->wp_filesystem->exists( $dir ) ) {
472
+ $this->core->wp_filesystem->mkdir( $dir );
473
+ }
474
+
475
+ $this->dir = trailingslashit( $dir );
476
+ $this->folder = basename( $dir );
477
+ $this->filepath = $this->dir . $this->filename;
478
+ $this->info = new \Boldgrid\Backup\V2\Step\Json_file( $this->get_path_to( 'info.json' ) );
479
+ }
480
+
481
  /**
482
  * Write a file to the step's directory.
483
  *
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit90730180c9c9176dc23f0ffddfb0dbbb::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitb1f5af037fce92093b4769cf19c0b864::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitb1f5af037fce92093b4769cf19c0b864
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitb1f5af037fce92093b4769cf19c0b864::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequireb1f5af037fce92093b4769cf19c0b864($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequireb1f5af037fce92093b4769cf19c0b864($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit90730180c9c9176dc23f0ffddfb0dbbb
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit90730180c9c9176dc23f0ffddfb0dbbb', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit90730180c9c9176dc23f0ffddfb0dbbb', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire90730180c9c9176dc23f0ffddfb0dbbb($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire90730180c9c9176dc23f0ffddfb0dbbb($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitb1f5af037fce92093b4769cf19c0b864
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
@@ -91,9 +91,9 @@ class ComposerStaticInitb1f5af037fce92093b4769cf19c0b864
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
- $loader->prefixLengthsPsr4 = ComposerStaticInitb1f5af037fce92093b4769cf19c0b864::$prefixLengthsPsr4;
95
- $loader->prefixDirsPsr4 = ComposerStaticInitb1f5af037fce92093b4769cf19c0b864::$prefixDirsPsr4;
96
- $loader->classMap = ComposerStaticInitb1f5af037fce92093b4769cf19c0b864::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
+ $loader->prefixLengthsPsr4 = ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb::$prefixLengthsPsr4;
95
+ $loader->prefixDirsPsr4 = ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb::$prefixDirsPsr4;
96
+ $loader->classMap = ComposerStaticInit90730180c9c9176dc23f0ffddfb0dbbb::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }