10% multisite-clone-duplicator

Code Review | MultiSite Clone Duplicator

WordPress plugin MultiSite Clone Duplicator scored10%from 54 tests.

About plugin

  • Plugin page: multisite-clone-d...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.0.0
  • WordPress version: 6.3.1
  • First release: Aug 1, 2014
  • Latest release: Nov 29, 2018
  • Number of updates: 37
  • Update frequency: every 43.1 days
  • Top authors: globalis (48.65%)pdargham (40.54%)daviddaug (16.22%)

Code review

54 tests

User reviews

85 reviews

Install metrics

200+ active /222,807 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/multisite-clone-duplicator/lib/functions.php+180
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/multisite-clone-duplicator/lib/functions.php:180
    Stack trace:
    #0 wp-content/plugins/multisite-clone-duplicator/include/option.php(16): MUCD_Functions::get_sites()
    #1 wp-content/plugins/multisite-clone-duplicator/include/option.php(65): MUCD_Option::init_duplicable_option()
    #2 wp-content/plugins/multisite-clone-duplicator/multisite-clone-duplicator.php(70): MUCD_Option::init_options()
    #3 wp-includes/class-wp-hook.php(310): MUCD::activate()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.55ms] Passed 4 tests

Analyzing server-side resources used by MultiSite Clone Duplicator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.08 ▼6.72
Dashboard /wp-admin3.31 ▲0.0045.23 ▼4.40
Posts /wp-admin/edit.php3.36 ▲0.0046.78 ▼1.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.22 ▼13.28
Media Library /wp-admin/upload.php3.23 ▲0.0037.47 ▲3.69

Server storage [IO: ▲0.69MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for MultiSite Clone Duplicator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼1.051.75 ▼0.4637.72 ▼9.40
Dashboard /wp-admin2,209 ▲214.88 ▼0.9996.42 ▼6.5339.99 ▼4.61
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0539.32 ▲5.2536.03 ▲2.48
Add New Post /wp-admin/post-new.php1,539 ▲623.21 ▼0.02620.03 ▼8.2943.89 ▼5.65
Media Library /wp-admin/upload.php1,385 ▼34.29 ▲0.0696.18 ▼17.6543.88 ▼1.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/multisite-clone-duplicator/multisite-clone-duplicator.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'MUCD_COMPLETE_PATH/lib/files.php' (include_path='.:/usr/share/php') in wp-content/plugins/multisite-clone-duplicator/lib/duplicate.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/multisite-clone-duplicator/template/network_admin_network_settings.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'MUCD_COMPLETE_PATH/lib/duplicate.php' (include_path='.:/usr/share/php') in wp-content/plugins/multisite-clone-duplicator/include/admin.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/multisite-clone-duplicator/include/lang.php:6
    • > PHP Warning
      Use of undefined constant MUCD_COMPLETE_PATH - assumed 'MUCD_COMPLETE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-clone-duplicator/lib/duplicate.php on line 5
    • > PHP Warning
      Use of undefined constant MUCD_NETWORK_PAGE_DUPLICATE_TITLE - assumed 'MUCD_NETWORK_PAGE_DUPLICATE_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-clone-duplicator/template/network_admin_duplicate_site.php on line 2
    • > PHP Warning
      require_once(MUCD_COMPLETE_PATH/lib/files.php): failed to open stream: No such file or directory in wp-content/plugins/multisite-clone-duplicator/lib/duplicate.php on line 5
    • > PHP Warning
      Use of undefined constant MUCD_SLUG_ACTION_SETTINGS - assumed 'MUCD_SLUG_ACTION_SETTINGS' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-clone-duplicator/template/network_admin_network_settings.php on line 1
    • > PHP Warning
      Use of undefined constant MUCD_SLUG_ACTION_SETTINGS - assumed 'MUCD_SLUG_ACTION_SETTINGS' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-clone-duplicator/template/network_admin_network_settings.php on line 1
    • > PHP Warning
      require_once(MUCD_COMPLETE_PATH/lib/duplicate.php): failed to open stream: No such file or directory in wp-content/plugins/multisite-clone-duplicator/include/admin.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (**Basic features**), #2 (**Advanced features**), #3 (**Settings**), #4 (**Successfull duplication**), #5 (**Log warning**)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

multisite-clone-duplicator/multisite-clone-duplicator.php Passed 13 tests

"MultiSite Clone Duplicator" version 1.5.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Clones an existing site into a new one in a multisite installation : copies all the posts, settings and files

Code Analysis Passed 3 tests

File types Passed 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
Good job! No executable or dangerous file extensions detected11,584 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript472,3595588,922
PHP133776241,451
PO File5228239575
CSS3150440
Markdown1690196

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.11
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods88
▷ Static methods7585.23%
▷ Public methods8596.59%
▷ Protected methods22.27%
▷ Private methods11.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants68
▷ Global constants6798.53%
▷ Class constants11.47%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png6.14KB4.40KB▼ 28.29%
screenshot-2.png9.12KB6.15KB▼ 32.55%
screenshot-3.png17.75KB18.96KB0.00%
screenshot-4.png3.17KB2.25KB▼ 29.12%
screenshot-1.png16.58KB17.41KB0.00%