78% duplicate-publish-multisite

Code Review | Duplicate Publish Multisite

WordPress plugin Duplicate Publish Multisite scored78%from 54 tests.

About plugin

  • Plugin page: duplicate-publish...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 16, 2021
  • Latest release: Aug 16, 2023
  • Number of updates: 12
  • Update frequency: every 63.6 days
  • Top authors: closemarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,574 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼3.18ms] Passed 4 tests

Analyzing server-side resources used by Duplicate Publish Multisite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.99 ▲2.71
Dashboard /wp-admin3.33 ▲0.0344.26 ▼4.21
Posts /wp-admin/edit.php3.38 ▲0.0346.43 ▼1.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.71 ▼5.74
Media Library /wp-admin/upload.php3.25 ▲0.0234.00 ▼1.05
Publish Multisite /wp-admin/options-general.php?page=publish_multisite_admin3.2028.87

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Duplicate Publish Multisite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.46 ▼0.121.74 ▼0.0842.95 ▼1.48
Dashboard /wp-admin2,211 ▲345.59 ▼0.0782.32 ▼6.2434.76 ▼8.26
Posts /wp-admin/edit.php2,116 ▲162.02 ▼0.0135.28 ▼0.5430.74 ▼3.83
Add New Post /wp-admin/post-new.php1,542 ▲1623.25 ▼0.39678.99 ▼8.9956.98 ▲2.57
Media Library /wp-admin/upload.php1,419 ▲224.27 ▲0.1295.11 ▼1.9643.69 ▼1.99
Publish Multisite /wp-admin/options-general.php?page=publish_multisite_admin7441.148.1424.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 did not uninstall successfully, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=publish_multisite_admin
    • > Error in wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php+208
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php:208
    Stack trace:
    #0 wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php(334): PUBMULT_Settings->get_sites_publish()
    #1 wp-admin/includes/template.php(1824): PUBMULT_Settings->musite_callback()
    #2 wp-admin/includes/template.php(1778): do_settings_fields()
    #3 wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php(104): do_settings_sections()
    #4 wp-includes/class-wp-hook.php(310): PUBMULT_Settings->create_admin_page()
    #5 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #6 wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 wp-admin/admin.php(259): do_action()
    #8 wp-admin/options-general.php(10): require_once('/var/ww

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/duplicate-publish-multisite/publish-multisite.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: multisite, sync posts, duplicate

duplicate-publish-multisite/publish-multisite.php 85% from 13 tests

This is the main PHP file of "Duplicate Publish Multisite" version 1.6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("duplicate-publish-multisite.php" instead of "publish-multisite.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected748 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP391217632
JavaScript28072
CSS15144

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity54.00
▷ Minimum class complexity45.00
▷ Maximum class complexity63.00
Average method complexity6.58
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1473.68%
▷ Protected methods00.00%
▷ Private methods526.32%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin