10% duplicate-wp-page-post

Code Review | Duplicate Page and Post

WordPress plugin Duplicate Page and Post scored10%from 54 tests.

About plugin

  • Plugin page: duplicate-wp-page...
  • Plugin version: 2.9.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: May 10, 2023
  • Number of updates: 57
  • Update frequency: every 40.5 days
  • Top authors: arjunthakur (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

100,000+ active /850,356 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/duplicate-wp-page-post/duplicate-wp-page-post.php+51
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.33ms] Passed 4 tests

This is a short check of server-side resources used by Duplicate Page and Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.89 ▼8.83
Dashboard /wp-admin3.37 ▲0.0649.08 ▲0.68
Posts /wp-admin/edit.php3.42 ▲0.0651.26 ▲3.13
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.61 ▲2.23
Media Library /wp-admin/upload.php3.29 ▲0.0637.50 ▲0.59
Duplicate post /wp-admin/options-general.php?page=dpp_page_settings3.2837.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
dpp_wpp_page_options

Browser metrics Passed 4 tests

Checking browser requirements for Duplicate Page and Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.52 ▼0.061.74 ▼1.5444.21 ▼3.10
Dashboard /wp-admin2,204 ▲165.83 ▼0.03114.95 ▲3.6042.09 ▲1.05
Posts /wp-admin/edit.php2,097 ▲52.02 ▼0.0140.91 ▲3.9336.87 ▲2.72
Add New Post /wp-admin/post-new.php1,542 ▲1423.05 ▼0.02644.73 ▲8.0360.69 ▼22.20
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.06126.39 ▼19.3457.05 ▲9.98
Duplicate post /wp-admin/options-general.php?page=dpp_page_settings9742.0233.2570.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • dpp_wpp_page_options
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=dpp_page_settings
    • > Notice in wp-content/plugins/duplicate-wp-page-post/duplicate-wp-page-post-setting.php+9
    Undefined index: instruct
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpp_page_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpp_page_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpp_page_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpp_page_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

duplicate-wp-page-post/duplicate-wp-page-post.php 92% from 13 tests

The principal PHP file in "Duplicate Page and Post" v. 2.9.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected338 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24430338

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin