56% xcloner-backup-and-restore

Code Review | Backup, Restore and Migrate WordPress Sites With the XCloner Plugin

WordPress plugin Backup, Restore and Migrate WordPress Sites With the XCloner Plugin scored56%from 54 tests.

About plugin

  • Plugin page: xcloner-backup-an...
  • Plugin version: 4.7.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2010
  • Latest release: Sep 11, 2023
  • Number of updates: 739
  • Update frequency: every 6.4 days
  • Top authors: xcloner (87.96%)watchful (12.18%)

Code review

54 tests

User reviews

125 reviews

Install metrics

10,000+ active /1,305,320 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲5.28MB] [CPU: ▲15.49ms] 50% from 4 tests

Analyzing server-side resources used by Backup, Restore and Migrate WordPress Sites With the XCloner Plugin
The following require your attention
  • RAM: You should keep total memory usage under 10MB (currently 10.89MB on /wp-admin/admin.php?page=xcloner_init_page)
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.28MB on /wp-admin/admin.php?page=xcloner_manage_backups_page)
PageMemory (MB)CPU Time (ms)
Home /7.60 ▲4.1450.71 ▲13.18
Dashboard /wp-admin8.98 ▲5.6869.31 ▲18.55
Posts /wp-admin/edit.php9.02 ▲5.6679.01 ▲27.84
Add New Post /wp-admin/post-new.php11.63 ▲5.74103.50 ▲2.37
Media Library /wp-admin/upload.php8.86 ▲5.6370.59 ▲36.97
Clone Site /wp-admin/admin.php?page=xcloner_clone_site8.8859.04
Generate Backups /wp-admin/admin.php?page=xcloner_generate_backups_page8.9059.99
Settings /wp-admin/admin.php?page=xcloner_settings_page8.8060.32
Schedules & Profiles /wp-admin/admin.php?page=xcloner_scheduled_backups_page8.8461.98
Restore Site /wp-admin/admin.php?page=xcloner_restore_site8.8856.03
Dashboard /wp-admin/admin.php?page=xcloner_init_page10.8963.59
Storage Locations /wp-admin/admin.php?page=xcloner_remote_storage_page9.2677.48
Manage Backups /wp-admin/admin.php?page=xcloner_manage_backups_page8.8257.81

Server storage [IO: ▲44.76MB] [DB: ▲0.00MB] 33% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • You have illegally modified 3 files (4.07KB) outside of "wp-content/plugins/xcloner-backup-and-restore/" and "wp-content/uploads/"
    • (new file) wp-content/backups-3aE1J/xcloner_main_a3bc5-2023-10-08.log
    • (new file) wp-content/backups-3aE1J/xcloner_restore.log
    • (new file) wp-content/backups-3aE1J/.xcloner/.empty
  • The filesystem usage should be lower than 25MB (currently using 44.76MB)
Filesystem: 8,884 new files
Database: 1 new table, 24 new options
New tables
wp_xcloner_scheduler
New WordPress options
xcloner_encryption_key
xcloner_store_path
xcloner_backup_compression_level
xcloner_database_records_per_request
xcloner_directories_to_scan_per_request
xcloner_files_to_process_per_request
xcloner_force_tmp_path_site_root
xcloner_enable_log
xcloner_exclude_files_larger_than_mb
xcloner_db_version
...

Browser metrics Passed 4 tests

Backup, Restore and Migrate WordPress Sites With the XCloner Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.25 ▼1.021.62 ▼0.3938.80 ▼3.52
Dashboard /wp-admin2,263 ▲724.87 ▼0.0197.91 ▼6.4040.40 ▼2.00
Posts /wp-admin/edit.php2,140 ▲512.05 ▲0.0539.06 ▼2.4435.40 ▼1.20
Add New Post /wp-admin/post-new.php1,585 ▲6518.22 ▼4.86614.06 ▼19.9167.42 ▲5.38
Media Library /wp-admin/upload.php1,439 ▲544.19 ▼0.0498.67 ▲1.0244.58 ▲1.89
Clone Site /wp-admin/admin.php?page=xcloner_clone_site1,7223.3258.4937.67
Generate Backups /wp-admin/admin.php?page=xcloner_generate_backups_page2,4633.2983.5934.61
Settings /wp-admin/admin.php?page=xcloner_settings_page1,3192.7838.3831.18
Schedules & Profiles /wp-admin/admin.php?page=xcloner_scheduled_backups_page2,0693.6792.9046.42
Restore Site /wp-admin/admin.php?page=xcloner_restore_site1,7723.3350.9241.15
Dashboard /wp-admin/admin.php?page=xcloner_init_page1,3282.7438.3243.89
Storage Locations /wp-admin/admin.php?page=xcloner_remote_storage_page3,6613.2647.0328.04
Manage Backups /wp-admin/admin.php?page=xcloner_manage_backups_page1,8063.8777.4242.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_xcloner_scheduler
  • Zombie WordPress options were found after uninstall: 24 options
    • xcloner_database_records_per_request
    • xcloner_encryption_key
    • xcloner_cleanup_retention_limit_days
    • widget_recent-comments
    • xcloner_split_backup_limit
    • xcloner_exclude_files_larger_than_mb
    • xcloner_cleanup_settings_page
    • xcloner_cleanup_retention_limit_archives
    • xcloner_directories_to_scan_per_request
    • xcloner_force_tmp_path_site_root
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/vobject/bin/fetch_windows_zones.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/vobject/bin/generateicalendardata.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/dav/bin/migrateto30.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/scripts/BumpStableSdkVersion.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/dav/bin/migrateto21.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/dav/bin/migrateto20.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/dav/bin/migrateto32.php
    • > /wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/scripts/BumpPreviewSdkVersion.php
  • 4093× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Ediscovery/Model/ReviewSet.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/TeamworkHardwareDetail.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/VulnerabilityState.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\WindowsKioskAppConfiguration' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/WindowsKioskSingleUWPApp.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'org\\bovigo\\vfs\\content\\SeekableFileContent' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/WindowsUpdates/Model/UserExperienceSettings.php:24
    • > PHP Fatal error
      Uncaught LogicException: Requested uri (/wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/http/examples/reverseproxy.php) is out of base uri (/reverseproxy.php) in wp-content/plugins/xcloner-backup-and-restore/vendor/sabre/http/lib/Request.php:184
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/UserExperienceAnalyticsSettings.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Beta\\Microsoft\\Graph\\Model\\Entity' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/Model/UserSet.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Microsoft\\Graph\\Core\\Enum' not found in wp-content/plugins/xcloner-backup-and-restore/vendor/microsoft/microsoft-graph/src/Model/Status.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: backup, cloud backup, wordpress migration, database backup, wordpress backup

xcloner-backup-and-restore/xcloner.php 85% from 13 tests

The principal PHP file in "Backup, Restore and Migrate WordPress Sites With the XCloner Plugin" v. 4.7.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 352 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xcloner-backup-and-restore.php" instead of "xcloner.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/xcloner-backup-and-restore/vendor/nesbot/carbon/bin/carbon.bat
      • wp-content/plugins/xcloner-backup-and-restore/vendor/aws/aws-crt-php/run_tests.bat
631,035 lines of code in 8,513 files:
LanguageFilesBlank linesComment linesLines of code
PHP8,30685,544583,820582,448
JavaScript304,6288,89328,416
JSON661307,453
CSS11435903,431
XSD392482,803
PO File37429711,818
YAML402161341,221
C1025089882
SVG223574
C/C++ Header210538441
XML1430372
LESS63924352
HTML4162230
Python262103223
Bourne Shell53226206
reStructuredText1352959
GLSL117055
m414422
Bourne Again Shell15013
diff12127
DOS Batch2206
INI2003

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.63
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces259
Interfaces181
Traits83
Classes7,336
▷ Abstract classes751.02%
▷ Concrete classes7,26198.98%
▷ Final classes550.76%
Methods60,232
▷ Static methods1,2822.13%
▷ Public methods58,35896.89%
▷ Protected methods8891.48%
▷ Private methods9851.64%
Functions1,135
▷ Named functions32828.90%
▷ Anonymous functions80771.10%
Constants11,438
▷ Global constants400.35%
▷ Class constants11,39899.65%
▷ Public constants11,38699.89%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/vakata/jstree/src/themes/default-dark/40px.png11.22KB5.60KB▼ 50.12%
vendor/vakata/jstree/dist/themes/default/40px.png2.16KB1.84KB▼ 15.12%
vendor/vakata/jstree/dist/themes/default/32px.png5.53KB2.93KB▼ 47.03%
vendor/vakata/jstree/dist/themes/default-dark/32px.png1.49KB1.53KB0.00%
admin/assets/file-icon-d.png0.26KB0.29KB0.00%