84% clone-page-or-post

Code Review | Clone Page Or Post Plugin for WordPress

WordPress plugin Clone Page Or Post Plugin for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: clone-page-or-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 24, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 4
  • Update frequency: every 24.2 days
  • Top authors: chitracreation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /520 total downloads


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.08MB] [CPU: ▼3.10ms] Passed 4 tests

A check of server-side resources used by Clone Page Or Post Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.38 ▼1.23
Dashboard /wp-admin3.39 ▲0.0847.12 ▼3.50
Posts /wp-admin/edit.php3.44 ▲0.0847.76 ▼1.88
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.57 ▼5.78
Media Library /wp-admin/upload.php3.31 ▲0.0840.11 ▲2.76
Clone Page or Post Page /wp-admin/options-general.php?page=clone_page_post_settings3.3236.57

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Clone Page Or Post Plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.24 ▲0.041.94 ▲0.1945.09 ▲1.03
Dashboard /wp-admin2,202 ▲255.61 ▲0.0489.97 ▼3.5839.59 ▼0.75
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0235.39 ▼6.0637.46 ▼0.02
Add New Post /wp-admin/post-new.php1,531 ▼623.13 ▲4.99651.28 ▲12.3347.83 ▼14.25
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.0296.88 ▼7.3743.70 ▲0.81
Clone Page or Post Page /wp-admin/options-general.php?page=clone_page_post_settings9501.9922.8225.68

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • clone_page_post_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/clone-page-or-post/inc/clone-page-post-admin-settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (This screenshot shows Where the clone option available for pages or posts.)
You can take inspiration from this readme.txt

clone-page-or-post/clone-page-or-post.php 92% from 13 tests

The main PHP script in "Clone Page Or Post Plugin for WordPress" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected475 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
There are no PNG files in this plugin