10% multisite-post-duplicator

Code Review | Multisite Post Duplicator

WordPress plugin Multisite Post Duplicator scored10%from 54 tests.

About plugin

  • Plugin page: multisite-post-du...
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 6.3.1
  • First release: Apr 11, 2015
  • Latest release: Apr 9, 2018
  • Number of updates: 113
  • Update frequency: every 9.7 days
  • Top authors: MagicStick (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

600+ active /89,679 total downloads

Benchmarks

Plugin footprint 23% 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/multisite-post-duplicator/mpd.php+104
    Invalid argument supplied for foreach()

Server metrics [RAM: ▼1.13MB] [CPU: ▼47.81ms] Passed 4 tests

Analyzing server-side resources used by Multisite Post Duplicator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6013.46 ▼25.53
Dashboard /wp-admin2.87 ▼0.4315.53 ▼34.43
Posts /wp-admin/edit.php2.87 ▼0.4816.93 ▼37.13
Add New Post /wp-admin/post-new.php2.87 ▼3.0115.65 ▼94.13
Media Library /wp-admin/upload.php2.87 ▼0.3615.96 ▼19.21
Multisite Post Duplicator /wp-admin/tools.php?page=multisite-post-duplicator2.8714.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 39 new files
Database: 1 new table, 8 new options
New tables
wp_mpd_log
New WordPress options
mpd_noted_posttypes
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
mpd_noted_taxonomies

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multisite Post Duplicator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.73 ▲0.451.61 ▼0.0241.53 ▼1.51
Dashboard /wp-admin2,210 ▲365.64 ▲0.1089.53 ▼1.0041.81 ▲2.25
Posts /wp-admin/edit.php2,119 ▲162.01 ▲0.0137.38 ▼5.2034.08 ▼3.65
Add New Post /wp-admin/post-new.php1,544 ▲723.14 ▲4.77595.66 ▼35.9057.75 ▼5.74
Media Library /wp-admin/upload.php1,452 ▲524.27 ▲0.06102.60 ▲4.5043.40 ▲2.09
Multisite Post Duplicator /wp-admin/tools.php?page=multisite-post-duplicator8151.8027.0828.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/multisite-post-duplicator/addons/restrictSites-mpd-addon.php+325
    Trying to access array offset on value of type bool
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mpd_log
  • The uninstall procedure has failed, leaving 8 options in the database
    • mpd_noted_posttypes
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • mpd_noted_taxonomies
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=multisite-post-duplicator
    • > Notice in wp-content/plugins/multisite-post-duplicator/addons/restrictSites-mpd-addon.php+325
    Trying to access array offset on value of type bool

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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/multisite-post-duplicator/inc/postform_ui.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-post-duplicator/addons/restrictSites-mpd-addon.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/multisite-post-duplicator/addons/bulkaction-mpd-addon.php:23
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multisite-post-duplicator/addons/posts-2-posts-addon.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multisite-post-duplicator/mpd.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-post-duplicator/inc/media.php:110
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-post-duplicator/addons/roleAccess-mpd-addon.php:22
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/multisite-post-duplicator/addons/posts-2-posts-addon.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/multisite-post-duplicator/addons/posts-2-posts-addon.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-post-duplicator/inc/load-scripts.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-post-duplicator/inc/persist.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: meta, multisite, individual, multi site, duplicate...

multisite-post-duplicator/mpd.php 92% from 13 tests

The entry point to "Multisite Post Duplicator" version 1.7.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("multisite-post-duplicator.php" instead of "mpd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected5,372 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP152,1081,6743,487
CSS512522715
SVG100685
Markdown1820252
JavaScript5976233

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions172
▷ Named functions172100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/select2x2.png0.83KB0.77KB▼ 6.15%
images/tick.png1.56KB0.67KB▼ 56.95%
images/smile.png1.52KB0.73KB▼ 51.84%
css/select2.png0.60KB0.99KB0.00%