84% duplicate-page

Code Review | Duplicate Page

WordPress plugin Duplicate Page scored 84% from 54 tests.

About plugin

  • Plugin page: duplicate-page
  • Plugin version: 4.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.9
  • WordPress version: 5.9.2
  • First release: May 4, 2016
  • Latest release: Jan 31, 2022
  • Number of updates: 85
  • Update frequency: every 24.7 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

257 reviews

Install metrics

2,000,000+ active / 16,316,026 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼304.66ms] Passed 4 tests

This is a short check of server-side resources used by Duplicate Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0560.40 ▲7.48
Dashboard /wp-admin3.44 ▲0.0333.61 ▼5.63
Posts /wp-admin/edit.php3.66 ▲0.0238.24 ▼35.41
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.37 ▼1,176.71
Media Library /wp-admin/upload.php3.31 ▲0.0225.68 ▼0.90
Duplicate Page /wp-admin/options-general.php?page=duplicate_page_settings3.3524.48

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Duplicate Page: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲3715.89 ▲0.666.01 ▲0.022.51 ▲0.02
Dashboard /wp-admin2,893 ▲356.10 ▼0.07119.26 ▼18.68224.72 ▲55.08
Posts /wp-admin/edit.php2,702 ▲113.24 ▼0.0062.92 ▼3.47145.91 ▼5.03
Add New Post /wp-admin/post-new.php1,763 ▲9717.62 ▼3.72416.18 ▼62.81211.50 ▲45.53
Media Library /wp-admin/upload.php1,699 ▲45.55 ▲0.11157.58 ▲11.89203.11 ▲1.88
Duplicate Page /wp-admin/options-general.php?page=duplicate_page_settings1,2392.6755.29130.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • duplicate_page_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/duplicate-page/duplicatepage.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/duplicate-page/inc/admin-settings.php:1

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
You can take inspiration from this readme.txt

duplicate-page/duplicatepage.php 92% from 13 tests

The entry point to "Duplicate Page" version 4.4.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("duplicate-page.php" instead of "duplicatepage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin965 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File5113151449

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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 files were detected