10% duplicate-post-and-page

Code Review | Duplicate Page and Post

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

About plugin

  • Plugin page: duplicate-post-an...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Jun 14, 2021
  • Latest release: Jun 14, 2021
  • Number of updates: 15
  • Update frequency: every 47.4 days
  • Top authors: falconsolutionsind (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /2,242 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/duplicate-post-and-page/duplicate-wp-post-page.php+46
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.97ms] Passed 4 tests

Server-side resources used by Duplicate Page and Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.01 ▲4.25
Dashboard /wp-admin3.36 ▲0.0645.31 ▼1.43
Posts /wp-admin/edit.php3.41 ▲0.0547.55 ▼2.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.11 ▼20.51
Media Library /wp-admin/upload.php3.28 ▲0.0538.60 ▲6.90
Duplicate Post /wp-admin/options-general.php?page=duplicate_post_settings3.2929.20

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
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
duplicate_wp_post_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Duplicate Page and Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.101.90 ▲0.0742.64 ▲0.42
Dashboard /wp-admin2,204 ▲155.83 ▲0.86110.69 ▼6.9339.99 ▼1.68
Posts /wp-admin/edit.php2,097 ▲82.00 ▲0.0034.60 ▼7.8634.06 ▼0.05
Add New Post /wp-admin/post-new.php1,545 ▲3122.81 ▲5.40655.70 ▲44.4555.35 ▲1.04
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0995.42 ▲3.3640.81 ▼0.79
Duplicate Post /wp-admin/options-general.php?page=duplicate_post_settings9382.0223.2645.32

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

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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

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

"Duplicate Page and Post" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("duplicate-post-and-page.php" instead of "duplicate-wp-post-page.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin244 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22230244

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity23.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