84% duplicate-post

Code Review | Yoast Duplicate Post

WordPress plugin Yoast Duplicate Post scored84%from 54 tests.

About plugin

  • Plugin page: duplicate-post
  • Plugin version: 4.5
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2007
  • Latest release: Sep 27, 2023
  • Number of updates: 602
  • Update frequency: every 9.6 days
  • Top authors: lopo (97.84%)Yoast (2.33%)

Code review

54 tests

User reviews

506 reviews

Install metrics

4,000,000+ active /33,147,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.85MB] [CPU: ▲2.06ms] Passed 4 tests

An overview of server-side resources used by Yoast Duplicate Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7043.29 ▼3.70
Dashboard /wp-admin4.26 ▲0.9161.06 ▲6.50
Posts /wp-admin/edit.php4.31 ▲0.9651.60 ▲7.00
Add New Post /wp-admin/post-new.php6.78 ▲0.8992.91 ▼1.56
Media Library /wp-admin/upload.php4.12 ▲0.8944.58 ▲10.17
Duplicate Post /wp-admin/options-general.php?page=duplicatepost4.1138.92

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 61 new files
Database: no new tables, 31 new options
New WordPress options
duplicate_post_taxonomies_blacklist
duplicate_post_copypassword
widget_theysaidso_widget
duplicate_post_copyattachments
duplicate_post_copythumbnail
duplicate_post_copyexcerpt
duplicate_post_types_enabled
duplicate_post_show_original_meta_box
theysaidso_admin_options
duplicate_post_copytemplate
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yoast Duplicate Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10614.24 ▼0.111.95 ▲0.2339.47 ▲1.83
Dashboard /wp-admin2,255 ▲865.60 ▼0.09100.02 ▼0.0796.30 ▲47.34
Posts /wp-admin/edit.php2,136 ▲361.98 ▲0.0336.95 ▲0.5032.56 ▲0.41
Add New Post /wp-admin/post-new.php1,540 ▲1421.09 ▼1.85716.77 ▲100.6965.39 ▲4.86
Media Library /wp-admin/upload.php1,404 ▲74.18 ▼0.01102.41 ▲4.4341.57 ▲0.73
Duplicate Post /wp-admin/options-general.php?page=duplicatepost1,2552.0225.1229.67

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
The following items require your attention
  • The uninstall procedure has failed, leaving 31 options in the database
    • duplicate_post_copystatus
    • duplicate_post_copytitle
    • duplicate_post_copyauthor
    • duplicate_post_show_original_column
    • duplicate_post_version
    • duplicate_post_show_link
    • widget_recent-comments
    • duplicate_post_copydate
    • duplicate_post_copycontent
    • duplicate_post_taxonomies_blacklist
    • ...

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/duplicate-post/compat/jetpack-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/duplicate-post/admin-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/duplicate-post/compat/wpml-functions.php:11

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: copy, clone, duplicate post

duplicate-post/duplicate-post.php Passed 13 tests

"Yoast Duplicate Post" version 4.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
95 characters long description:
The go-to tool for cloning posts and pages, including the powerful Rewrite & Republish feature.

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
Success! There were no dangerous files found in this plugin4,901 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP501,0042,6874,783
CSS2182113
JavaScript5005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.54
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods249
▷ Static methods3212.85%
▷ Public methods23694.78%
▷ Protected methods93.61%
▷ Private methods41.61%
Functions36
▷ Named functions3288.89%
▷ Anonymous functions411.11%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
duplicate_post_yoast_icon-125x125.png18.35KB3.74KB▼ 79.62%