78% duplicate-publish-multisite

Code Review | Duplicate Publish Multisite

WordPress plugin Duplicate Publish Multisite scored 78% from 54 tests.

About plugin

  • Plugin page: duplicate-publish...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Jul 16, 2021
  • Latest release: Oct 29, 2021
  • Number of updates: 4
  • Update frequency: every 26.8 days
  • Top authors: closemarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 134 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.09MB] [CPU: ▼138.57ms] 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 /2.91 ▲0.1935.99 ▲11.95
Dashboard /wp-admin3.15 ▲0.1044.89 ▲8.29
Posts /wp-admin/edit.php3.20 ▲0.1043.31 ▼2.47
Add New Post /wp-admin/post-new.php5.51 ▲0.0887.70 ▼560.47
Media Library /wp-admin/upload.php3.09 ▲0.0932.90 ▲0.37
Publish Multisite /wp-admin/options-general.php?page=publish_multisite_admin3.0429.31

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

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 /3,691 ▲9516.30 ▲0.988.37 ▼1.5952.24 ▲3.54
Dashboard /wp-admin3,001 ▲676.23 ▲0.14142.68 ▼9.02106.77 ▲1.99
Posts /wp-admin/edit.php2,751 ▲122.73 ▲0.0368.31 ▲6.2889.48 ▲1.56
Add New Post /wp-admin/post-new.php1,625 ▼5821.57 ▲2.82289.84 ▼96.0198.59 ▼8.17
Media Library /wp-admin/upload.php1,816 ▲95.08 ▲0.04174.68 ▲19.47121.73 ▲14.27
Publish Multisite /wp-admin/options-general.php?page=publish_multisite_admin9132.1333.7779.51

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 did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

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+187
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php:187
    Stack trace:
    #0 wp-content/plugins/duplicate-publish-multisite/includes/class-pubmult-settings.php(308): PUBMULT_Settings->get_sites_publish()
    #1 wp-admin/includes/template.php(1743): PUBMULT_Settings->musite_callback()
    #2 wp-admin/includes/template.php(1701): 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(303): PUBMULT_Settings->create_admin_page()
    #5 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #6 wp-includes/plugin.php(470): 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
2 plugin tags: multisite, duplicate

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

This is the main PHP file of "Duplicate Publish Multisite" version 1.3, 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:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • 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")

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 detected531 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP373192478
JavaScript13030
CSS11023

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.37
Average class complexity34.00
▷ Minimum class complexity31.00
▷ Maximum class complexity37.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1164.71%
▷ Protected methods00.00%
▷ Private methods635.29%
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