84% network-post-duplicator

Code Review | Network Post Duplicator

WordPress plugin Network Post Duplicator scored84%from 54 tests.

About plugin

  • Plugin page: network-post-dupl...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 29
  • Update frequency: every 1.3 days
  • Top authors: jvelgar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /293 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.74ms] Passed 4 tests

An overview of server-side resources used by Network Post Duplicator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.12 ▲4.31
Dashboard /wp-admin3.39 ▲0.0845.21 ▼1.96
Posts /wp-admin/edit.php3.50 ▲0.1447.00 ▼0.35
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.81 ▼14.39
Media Library /wp-admin/upload.php3.31 ▲0.0833.30 ▼2.27
Network Post Duplicator /wp-admin/options-general.php?page=network-post-duplicator3.2831.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Network Post Duplicator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.34 ▼0.944.36 ▲2.3238.87 ▼11.40
Dashboard /wp-admin2,207 ▲225.99 ▲1.07102.48 ▼19.4838.65 ▼3.80
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0239.42 ▼0.8036.10 ▲0.93
Add New Post /wp-admin/post-new.php1,516 ▼1217.56 ▼0.52641.42 ▲20.0250.02 ▼1.83
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.0295.73 ▼6.4542.14 ▼4.84
Network Post Duplicator /wp-admin/options-general.php?page=network-post-duplicator7982.0626.1828.08

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/network-post-duplicator/duplicate-post-to-site.php:262

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

network-post-duplicator/duplicate-post-to-site.php 92% from 13 tests

Analyzing the main PHP file in "Network Post Duplicator" version 1.4.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("network-post-duplicator.php" instead of "duplicate-post-to-site.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected432 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18827362
PO File110038
CSS17032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin