84% duplicate-page

Code Review | Duplicate Page

WordPress plugin Duplicate Page scored84%from 54 tests.

About plugin

  • Plugin page: duplicate-page
  • Plugin version: 4.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: May 4, 2016
  • Latest release: Sep 11, 2023
  • Number of updates: 91
  • Update frequency: every 29.5 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

345 reviews

Install metrics

3,000,000+ active /25,034,273 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 gracefully, with no errors

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

Analyzing server-side resources used by Duplicate Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.46 ▼5.97
Dashboard /wp-admin3.33 ▲0.0246.20 ▼4.88
Posts /wp-admin/edit.php3.38 ▲0.0250.28 ▼2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.65 ▼5.15
Media Library /wp-admin/upload.php3.25 ▲0.0237.41 ▲4.30
Duplicate Page /wp-admin/options-general.php?page=duplicate_page_settings3.2838.43

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
duplicate_page_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Duplicate Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.68 ▼0.571.70 ▼0.1344.85 ▲2.84
Dashboard /wp-admin2,210 ▲194.87 ▼0.01107.30 ▲2.1841.45 ▼4.37
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0240.34 ▼0.5837.61 ▼1.96
Add New Post /wp-admin/post-new.php1,536 ▲1723.16 ▼0.01642.95 ▼28.5565.51 ▲8.20
Media Library /wp-admin/upload.php1,392 ▲14.20 ▲0.0899.61 ▼7.2343.64 ▼0.95
Duplicate Page /wp-admin/options-general.php?page=duplicate_page_settings9672.3527.6428.35

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please 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 plugin_basename() in wp-content/plugins/duplicate-page/duplicatepage.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/duplicate-page/inc/admin-settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

duplicate-page/duplicatepage.php 92% from 13 tests

"Duplicate Page" version 4.5.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("duplicate-page.php" instead of "duplicatepage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected977 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File5113151449
PHP22193373
CSS2120101
JavaScript22054

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin