84% duplicate-it

Code Review | Duplicate it

WordPress plugin Duplicate it scored84%from 54 tests.

About plugin

  • Plugin page: duplicate-it
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 25, 2018
  • Latest release: Oct 25, 2023
  • Number of updates: 25
  • Update frequency: every 70.6 days
  • Top authors: shubhamgrover7256 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Duplicate it
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.79 ▼7.10
Dashboard /wp-admin3.33 ▼0.0244.41 ▼16.52
Posts /wp-admin/edit.php3.38 ▲0.0242.32 ▼1.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.58 ▼14.52
Media Library /wp-admin/upload.php3.25 ▲0.0239.24 ▲8.96
Duplicate IT /wp-admin/options-general.php?page=duplicate_it_settings3.2432.28

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Duplicate it
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.19 ▼0.171.63 ▼0.0342.68 ▲7.01
Dashboard /wp-admin2,228 ▲535.58 ▼0.0283.26 ▼21.7642.52 ▲1.19
Posts /wp-admin/edit.php2,133 ▲332.00 ▼0.0235.85 ▲0.5032.82 ▼2.76
Add New Post /wp-admin/post-new.php1,535 ▲923.81 ▲0.72659.84 ▼5.2460.20 ▲6.84
Media Library /wp-admin/upload.php1,407 ▲74.13 ▼0.07110.85 ▲4.3546.56 ▼0.56
Duplicate IT /wp-admin/options-general.php?page=duplicate_it_settings9482.0123.1229.11

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

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/duplicate-it/post-duplicate.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/duplicate-it/duplicate-post-setting.php:13

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: post duplicate, duplicate custom posts, page duplicate, duplicate page, duplicate post

duplicate-it/post-duplicate.php 92% from 13 tests

The main PHP script in "Duplicate it" version 1.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("duplicate-it.php" instead of "post-duplicate.php")

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
Success! There were no dangerous files found in this plugin414 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP210747366
JavaScript13134
CSS12014

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.34
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin