90% duplicate-pages-and-posts

Code Review | Duplicate Pages and Posts

WordPress plugin Duplicate Pages and Posts scored 90% from 54 tests.

About plugin

  • Plugin page: duplicate-pages-a...
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Jun 12, 2023
  • Number of updates: 10
  • Update frequency: every 71.7 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 776 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
This plugin's installer ran successfully

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

Server-side resources used by Duplicate Pages and Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0738.38 ▼2.81
Dashboard /wp-admin3.36 ▲0.0645.15 ▼2.47
Posts /wp-admin/edit.php3.41 ▲0.0649.20 ▲0.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.94 ▼5.20
Media Library /wp-admin/upload.php3.28 ▲0.0635.56 ▲0.06
Duplicate Page & Post /wp-admin/options-general.php?page=options-duplicate-page-post3.3430.10

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
gwdp_allowed_options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Duplicate Pages and Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.19 ▼1.081.61 ▼0.1339.94 ▼3.60
Dashboard /wp-admin2,212 ▲244.87 ▼0.18110.31 ▲2.2238.39 ▼7.24
Posts /wp-admin/edit.php2,102 ▲102.01 ▲0.0039.60 ▼1.1134.31 ▼2.66
Add New Post /wp-admin/post-new.php1,533 ▼023.06 ▼0.05595.33 ▼87.1557.84 ▲7.18
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0599.80 ▼15.5042.02 ▼8.51
Duplicate Page & Post /wp-admin/options-general.php?page=options-duplicate-page-post1,0512.0223.9256.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • gwdp_allowed_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: duplicate post, duplicate custom post, clone post, duplicate page, clone page

duplicate-pages-and-posts/duplicate-pages-and-posts.php Passed 13 tests

"Duplicate Pages and Posts" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
A plugin to add Duplicate Page, post and custom post

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 detected476 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36223446
CSS15030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions16
▷ Named functions1381.25%
▷ Anonymous functions318.75%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin