84% clone-posts

Code Review | Clone Posts

WordPress plugin Clone Posts scored84%from 54 tests.

About plugin

  • Plugin page: clone-posts
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Mar 14, 2023
  • Number of updates: 12
  • Update frequency: every 266.5 days
  • Top authors: pattihis (91.67%)lukasz.webmaster (16.67%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /136,117 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.05ms] Passed 4 tests

An overview of server-side resources used by Clone Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.68 ▲0.63
Dashboard /wp-admin3.41 ▲0.1147.21 ▼3.54
Posts /wp-admin/edit.php3.53 ▲0.1749.45 ▼8.21
Add New Post /wp-admin/post-new.php5.99 ▲0.1195.09 ▼1.89
Media Library /wp-admin/upload.php3.34 ▲0.1135.73 ▼2.57
Clone Posts /wp-admin/options-general.php?page=clone-posts-options3.3032.36

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Clone Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3313.19 ▼1.241.61 ▼0.2641.33 ▲0.20
Dashboard /wp-admin2,225 ▲195.86 ▲0.9999.64 ▼5.3939.30 ▼4.99
Posts /wp-admin/edit.php2,127 ▲272.02 ▼0.0336.50 ▼4.8035.61 ▼1.66
Add New Post /wp-admin/post-new.php1,548 ▲2223.17 ▲5.42656.34 ▼108.4658.27 ▼0.59
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0596.12 ▼12.3241.13 ▼6.78
Clone Posts /wp-admin/options-general.php?page=clone-posts-options9122.0222.3530.87

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/clone-posts/admin/partials/clone-posts-admin-display.php:20

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

clone-posts/clone-posts.php Passed 13 tests

Analyzing the main PHP file in "Clone Posts" version 2.0.4
103 characters long description:
Easily clone (duplicate) Posts, Pages and Custom Post Types, including their custom fields (post_meta).

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
There were no executable files found in this plugin497 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10150496497

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.83
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2686.67%
▷ Protected methods00.00%
▷ Private methods413.33%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin