84% wp-page-duplicator

Code Review | Page Duplicator

WordPress plugin Page Duplicator scored84%from 54 tests.

About plugin

  • Plugin page: wp-page-duplicator
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Jun 1, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: samuelkwle (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

6,000+ active /30,337 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼12.33ms] Passed 4 tests

Analyzing server-side resources used by Page Duplicator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.83 ▼9.86
Dashboard /wp-admin3.35 ▲0.0148.84 ▼14.99
Posts /wp-admin/edit.php3.40 ▲0.0550.12 ▼1.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.52 ▼22.69
Media Library /wp-admin/upload.php3.27 ▲0.0436.61 ▼1.76
Page Duplicator /wp-admin/options-general.php?page=page-duplicator-settings3.2434.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Page Duplicator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.26 ▼0.931.73 ▼0.1544.53 ▼0.90
Dashboard /wp-admin2,210 ▲225.90 ▲1.00110.09 ▲0.1043.36 ▲0.08
Posts /wp-admin/edit.php2,097 ▲112.03 ▲0.0440.12 ▲0.5433.19 ▼2.92
Add New Post /wp-admin/post-new.php1,517 ▼1117.55 ▼0.70688.87 ▲38.9253.28 ▲0.33
Media Library /wp-admin/upload.php1,395 ▲104.20 ▼0.00100.39 ▼4.8944.05 ▲0.90
Page Duplicator /wp-admin/options-general.php?page=page-duplicator-settings8372.0327.0329.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-page-duplicator/page-duplicator-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-page-duplicator/page-duplicator.php:14

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: duplcate post, clone post, post duplicator, duplicate page, page duplicator...

wp-page-duplicator/page-duplicator.php 92% from 13 tests

"Page Duplicator" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-page-duplicator.php" instead of "page-duplicator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin752 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS112526557
PHP23928195

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/select2x2.png0.83KB0.77KB▼ 6.15%
css/select2.png0.60KB0.99KB0.00%