10% wp-duplicate-posts-pages-cpt

Code Review | WP Duplicate posts pages & CPT

WordPress plugin WP Duplicate posts pages & CPT scored10%from 54 tests.

About plugin

  • Plugin page: wp-duplicate-post...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Oct 22, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: priyankabhave15 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,898 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/wp-duplicate-posts-pages-cpt/includes/dp_manage.php+3
    Uncaught ArgumentCountError: Too few arguments to function DPWP_add_row_actions(), 0 passed in wp-content/plugins/wp-duplicate-posts-pages-cpt/duplicate-post-page.php on line 18 and exactly 1 expected in wp-content/plugins/wp-duplicate-posts-pages-cpt/includes/dp_manage.php:3
    Stack trace:
    #0 wp-content/plugins/wp-duplicate-posts-pages-cpt/duplicate-post-page.php(18): DPWP_add_row_actions()
    #1 wp-includes/class-wp-hook.php(310): DPWP_install_dupl()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.73ms] Passed 4 tests

Server-side resources used by WP Duplicate posts pages & CPT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.61 ▲9.84
Dashboard /wp-admin3.31 ▼0.0439.26 ▼22.75
Posts /wp-admin/edit.php3.36 ▲0.0047.24 ▼0.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.36 ▼24.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.51 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

WP Duplicate posts pages & CPT: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.40 ▼0.191.72 ▼0.2738.24 ▼1.16
Dashboard /wp-admin2,209 ▲174.87 ▼0.09111.67 ▲5.7144.03 ▲3.63
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0839.83 ▼2.7536.42 ▲1.51
Add New Post /wp-admin/post-new.php1,537 ▲1723.30 ▼0.08602.53 ▼60.9956.68 ▲7.73
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0197.95 ▼0.1340.17 ▼4.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-duplicate-posts-pages-cpt/includes/dp_manage.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-duplicate-posts-pages-cpt/includes/dp_manage.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-duplicate-posts-pages-cpt/duplicate-post-page.php 77% from 13 tests

The entry point to "WP Duplicate posts pages & CPT" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-duplicate-posts-pages-cpt.php" instead of "duplicate-post-page.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin80 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2191380

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin