72% duplicator

Code Review | Duplicator - WordPress Migration & Backup Plugin

WordPress plugin Duplicator - WordPress Migration & Backup Plugin scored72%from 54 tests.

About plugin

  • Plugin page: duplicator
  • Plugin version: 1.5.7.1
  • PHP compatiblity: 5.3.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 7, 2011
  • Latest release: Nov 16, 2023
  • Number of updates: 1,265
  • Update frequency: every 3.6 days
  • Top authors: cory@lamle.org (94.78%)seedprod (4.03%)bobriley (1.19%)

Code review

54 tests

User reviews

4241 reviews

Install metrics

1,000,000+ active /39,262,932 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.60ms] Passed 4 tests

A check of server-side resources used by Duplicator - WordPress Migration & Backup Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.62 ▼0.03
Dashboard /wp-admin3.59 ▲0.2954.74 ▲4.21
Posts /wp-admin/edit.php3.64 ▲0.2854.80 ▲9.54
Add New Post /wp-admin/post-new.php6.18 ▲0.2988.33 ▼13.04
Media Library /wp-admin/upload.php3.51 ▲0.2839.30 ▲6.47
About Us /wp-admin/admin.php?page=duplicator-about-us3.6741.20
Import /wp-admin/admin.php?page=duplicator-import3.5035.37
Schedules NEW! /wp-admin/admin.php?page=duplicator-schedules3.4935.36
Storage /wp-admin/admin.php?page=duplicator-storage3.5031.69
Welcome to Duplicator /wp-admin/index.php?page=duplicator-getting-started3.5146.13
Packages /wp-admin/admin.php?page=duplicator3.6737.71
Tools /wp-admin/admin.php?page=duplicator-tools3.70152.15
Settings /wp-admin/admin.php?page=duplicator-settings3.5837.38

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 4 files (0.42KB) outside of "wp-content/plugins/duplicator/" and "wp-content/uploads/"
    • (new file) wp-content/backups-dup-lite/tmp/index.php
    • (new file) wp-content/backups-dup-lite/.htaccess
    • (new file) wp-content/backups-dup-lite/robots.txt
    • (new file) wp-content/backups-dup-lite/index.php
Filesystem: 895 new files
Database: 1 new table, 12 new options
New tables
wp_duplicator_packages
New WordPress options
duplicator_plugin_data_stats
widget_theysaidso_widget
duplicator_uninstall_package
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
duplicator_uninstall_settings
duplicator_settings
...

Browser metrics Passed 4 tests

An overview of browser requirements for Duplicator - WordPress Migration & Backup Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲24614.72 ▲0.381.74 ▲0.0654.83 ▲8.90
Dashboard /wp-admin2,417 ▲2405.79 ▲0.1794.98 ▼4.1561.63 ▲17.43
Posts /wp-admin/edit.php2,210 ▲1102.07 ▲0.0938.30 ▲1.3150.96 ▲15.65
Add New Post /wp-admin/post-new.php1,582 ▲4623.07 ▲0.07675.52 ▲68.2351.52 ▲1.13
Media Library /wp-admin/upload.php1,492 ▲924.17 ▼0.05101.04 ▲4.0858.47 ▲15.11
About Us /wp-admin/admin.php?page=duplicator-about-us1,6882.0636.4070.69
Import /wp-admin/admin.php?page=duplicator-import1,3322.2137.0784.86
Schedules NEW! /wp-admin/admin.php?page=duplicator-schedules1,5782.2033.1559.62
Storage /wp-admin/admin.php?page=duplicator-storage1,6772.2235.3442.69
Welcome to Duplicator /wp-admin/index.php?page=duplicator-getting-started1,4492.0731.1961.06
Packages /wp-admin/admin.php?page=duplicator1,3862.5060.1464.32
Tools /wp-admin/admin.php?page=duplicator-tools7,1822.82194.8642.80
Settings /wp-admin/admin.php?page=duplicator-settings1,5683.1063.5354.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=duplicator-storage
    • > Notice in wp-content/plugins/duplicator/template/mocks/storage/storage.php+160
    Undefined index: utm_medium

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/duplicator/installer/dup-installer/index.php
  • 109× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/duplicator/vendor/requests/library/Requests/Exception/HTTP/401.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Utility_CaseInsensitiveDictionary' not found in wp-content/plugins/duplicator/vendor/requests/library/Requests/Response/Headers.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Duplicator\\Libs\\Snap\\JsonSerialize\\AbstractJsonSerializable' not found in wp-content/plugins/duplicator/installer/dup-installer/src/Core/Deploy/Files/Filters.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Duplicator\\Ajax\\AbstractAjaxService' not found in wp-content/plugins/duplicator/src/Ajax/ServicesDashboard.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/duplicator/vendor/requests/library/Requests/Exception/HTTP/405.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/duplicator/vendor/requests/library/Requests/Exception/HTTP/418.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Duplicator\\Ajax\\AbstractAjaxService' not found in wp-content/plugins/duplicator/src/Ajax/ServicesEducation.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Duplicator\\Libs\\DupArchive\\Headers\\DupArchiveReaderFileHeader' not found in wp-content/plugins/duplicator/src/Libs/DupArchive/Headers/DupArchiveFileHeader.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/duplicator/vendor/requests/library/Requests/Exception/HTTP/402.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/duplicator/src/Libs/OneClickUpgrade/PluginSilentUpgrader.php on line 15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Main Interface for all Packages) image missing
The official readme.txt might help

duplicator/duplicator.php Passed 13 tests

The principal PHP file in "Duplicator - WordPress Migration & Backup Plugin" v. 1.5.7.1 is loaded by WordPress automatically on each request
127 characters long description:
Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected96,641 lines of code in 767 files:
LanguageFilesBlank linesComment linesLines of code
PHP63111,20023,45572,974
JavaScript793,4151,22014,150
CSS196771853,315
PO File11,1781,3313,271
Smarty12094391,450
Markdown31850725
SVG3082707
HTML13321
JSON10019
XML1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity19.70
▷ Minimum class complexity1.00
▷ Maximum class complexity260.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces38
Interfaces11
Traits0
Classes358
▷ Abstract classes143.91%
▷ Concrete classes34496.09%
▷ Final classes3911.34%
Methods2,658
▷ Static methods1,29448.68%
▷ Public methods1,97874.42%
▷ Protected methods48318.17%
▷ Private methods1977.41%
Functions149
▷ Named functions2214.77%
▷ Anonymous functions12785.23%
Constants865
▷ Global constants11112.83%
▷ Class constants75487.17%
▷ Public constants754100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
55 PNG files occupy 0.41MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
assets/img/about/plugin-affwp.png1.18KB1.27KB0.00%
installer/dup-installer/assets/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
assets/css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
installer/dup-installer/favicon/pro01_mstile-150x150.png16.64KB6.15KB▼ 63.01%