90% duplicate-post-rb

Code Review | Duplicate Post - copy post, clone post, post draft

WordPress plugin Duplicate Post - copy post, clone post, post draft scored 90% from 54 tests.

About plugin

  • Plugin page: duplicate-post-rb
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2021
  • Latest release: May 18, 2023
  • Number of updates: 11
  • Update frequency: every 47.2 days
  • Top authors: rbplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.22ms] Passed 4 tests

Server-side resources used by Duplicate Post - copy post, clone post, post draft
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.93 ▼3.08
Dashboard /wp-admin3.32 ▲0.0246.63 ▼4.95
Posts /wp-admin/edit.php3.37 ▲0.0243.90 ▼4.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.32 ▼0.39
Media Library /wp-admin/upload.php3.24 ▲0.0234.06 ▼4.59
Duplicate Post /wp-admin/admin.php?page=rb_duplicate_post_settings3.2530.64

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Duplicate Post - copy post, clone post, post draft: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9814.80 ▲0.421.68 ▼0.2944.96 ▼0.26
Dashboard /wp-admin2,233 ▲455.80 ▲0.92101.25 ▼17.7339.43 ▼7.22
Posts /wp-admin/edit.php2,121 ▲352.05 ▼0.0036.26 ▼0.7236.87 ▲0.44
Add New Post /wp-admin/post-new.php1,568 ▲5423.11 ▲5.63665.51 ▼18.9553.34 ▼3.62
Media Library /wp-admin/upload.php1,421 ▲304.20 ▼0.0199.35 ▲2.1844.38 ▲2.05
Duplicate Post /wp-admin/admin.php?page=rb_duplicate_post_settings9382.1328.0328.78

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 smoke test targeting browser errors/issues
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
2 plugin tags: duplicate post, clone post

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

"Duplicate Post - copy post, clone post, post draft" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
Duplicate Post RB is a simple and lightweight plugin that allows you to duplicate any post easily

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected582 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48341403
SVG111107
PO File1212172

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1260.00%
▷ Protected methods00.00%
▷ Private methods840.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected