62% wp-migration-duplicator

Code Review | WordPress Backup & Migration

WordPress plugin WordPress Backup & Migration scored62%from 54 tests.

About plugin

  • Plugin page: wp-migration-dupl...
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 18, 2017
  • Latest release: Oct 27, 2023
  • Number of updates: 72
  • Update frequency: every 30.6 days
  • Top authors: webtoffee (75%)markhf (26.39%)

Code review

54 tests

User reviews

40 reviews

Install metrics

8,000+ active /279,582 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.68MB] [CPU: ▲6.58ms] Passed 4 tests

An overview of server-side resources used by WordPress Backup & Migration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.6951.34 ▲13.52
Dashboard /wp-admin4.99 ▲1.6455.50 ▼3.88
Posts /wp-admin/edit.php5.04 ▲1.6853.12 ▲5.63
Add New Post /wp-admin/post-new.php7.59 ▲1.70100.54 ▲11.03
Media Library /wp-admin/upload.php4.92 ▲1.6850.38 ▲15.58
Logs /wp-admin/admin.php?page=wp-migration-duplicator-log4.8340.40
Upgrade to premium /wp-admin/admin.php?page=wp-migration-duplicator-premium4.8242.03
Backup & Migration /wp-admin/admin.php?page=wp-migration-duplicator4.9852.72
Settings /wp-admin/admin.php?page=wp-migration-duplicator-settings4.8755.13

Server storage [IO: ▲5.46MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • The plugin illegally modified 2 files (0.04KB) outside of "wp-content/plugins/wp-migration-duplicator/" and "wp-content/uploads/"
    • (new file) wp-content/webtoffee_migrations/.htaccess
    • (new file) wp-content/webtoffee_migrations/index.php
Filesystem: 639 new files
Database: 3 new tables, 8 new options
New tables
wp_wtmgdp_log
wp_wt_mgdp_action_history
wp_wt_mgdp_ftp
New WordPress options
widget_recent-posts
db_upgraded
wtmigrator_start_date
theysaidso_admin_options
wt_mgdp_admin_modules
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WordPress Backup & Migration: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲11214.19 ▼0.371.55 ▼0.0642.70 ▲5.52
Dashboard /wp-admin2,276 ▲965.51 ▼0.1386.62 ▲0.6838.44 ▼4.11
Posts /wp-admin/edit.php2,184 ▲842.01 ▲0.0235.64 ▲1.1532.53 ▼1.22
Add New Post /wp-admin/post-new.php1,551 ▲1623.38 ▲4.97626.76 ▼13.9852.06 ▼13.03
Media Library /wp-admin/upload.php1,491 ▲914.24 ▲0.0595.33 ▼2.7841.09 ▼4.53
Logs /wp-admin/admin.php?page=wp-migration-duplicator-log8722.0323.5325.66
Upgrade to premium /wp-admin/admin.php?page=wp-migration-duplicator-premium5,0824.2095.98139.36
Backup & Migration /wp-admin/admin.php?page=wp-migration-duplicator3,6979.41298.1457.39
Settings /wp-admin/admin.php?page=wp-migration-duplicator-settings2,1002.1943.6742.22

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
  • Zombie tables detected upon uninstall: 3 tables
    • wp_wtmgdp_log
    • wp_wt_mgdp_ftp
    • wp_wt_mgdp_action_history
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • wtmigrator_start_date
    • wt_mgdp_admin_modules
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-migration-duplicator/public/partials/wp-migration-duplicator-public-display.php
  • 247× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/google/apiclient-services/src/Google/Service/Drive/DriveFileImageMediaMetadataLocation.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\et\\SSH2' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:47
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/wp-migration-duplicator/admin/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wp-migration-duplicator
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wp-migration-duplicator 814 The specified value "/" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/admin.php?page=wp-migration-duplicator
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wp-migration-duplicator 818 The specified value "onchange=\"if(parseInt(this.value,10)\u003C10)this.value='0'+this.value;\"" cannot be parsed, or is out of range.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-migration-duplicator/wp-migration-duplicator.php Passed 13 tests

Analyzing the main PHP file in "WordPress Backup & Migration" version 1.4.5
58 characters long description:
Migrate WordPress contents and database quickly with ease.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin85,805 lines of code in 536 files:
LanguageFilesBlank linesComment linesLines of code
PHP44112,83740,37872,798
Markdown441,87305,289
PO File51,1371,5432,990
JavaScript10211442,201
JSON17001,571
CSS49056718
SVG1002166
YAML26042
XML10011
Dockerfile18010
make1409

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.02
▷ Minimum class complexity1.00
▷ Maximum class complexity633.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces41
Interfaces32
Traits9
Classes387
▷ Abstract classes133.36%
▷ Concrete classes37496.64%
▷ Final classes143.74%
Methods4,231
▷ Static methods2475.84%
▷ Public methods3,71587.80%
▷ Protected methods1894.47%
▷ Private methods3277.73%
Functions188
▷ Named functions6836.17%
▷ Anonymous functions12063.83%
Constants581
▷ Global constants579.81%
▷ Class constants52490.19%
▷ Public constants50596.37%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
29 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/modules/export/assets/css/images/html.png0.72KB0.75KB0.00%
admin/modules/export/assets/css/images/zip.png0.38KB0.53KB0.00%
admin/modules/export/assets/css/images/java.png0.62KB0.65KB0.00%
admin/modules/export/assets/css/images/db.png0.57KB0.58KB0.00%
admin/modules/export/assets/css/images/code.png0.59KB0.59KB0.50%