84% wp-duplicate-posts-and-pages

Code Review | WP Duplicate Posts And Pages

WordPress plugin WP Duplicate Posts And Pages scored 84% from 54 tests.

About plugin

  • Plugin page: wp-duplicate-post...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 21, 2019
  • Latest release: May 16, 2022
  • Number of updates: 4
  • Update frequency: every 303.0 days
  • Top authors: eastsidecode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 1,400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WP Duplicate Posts And Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.16 ▼2.79
Dashboard /wp-admin3.31 ▲0.0149.07 ▲5.23
Posts /wp-admin/edit.php3.36 ▲0.0145.20 ▲1.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.16 ▲9.66
Media Library /wp-admin/upload.php3.23 ▲0.0133.49 ▲0.60

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

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

Browser metrics Passed 4 tests

WP Duplicate Posts And Pages: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.13 ▼1.284.85 ▲3.1940.13 ▼2.05
Dashboard /wp-admin2,209 ▲64.84 ▼0.9795.63 ▼0.3939.47 ▼0.64
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0234.22 ▲1.9834.61 ▲0.86
Add New Post /wp-admin/post-new.php1,534 ▲123.35 ▲0.24659.87 ▼26.6651.86 ▼3.48
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.1494.47 ▼3.7743.70 ▼5.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-duplicate-posts-and-pages/wp-duplicate-posts-and-pages.php:98

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: duplicate posts, duplicate pages

wp-duplicate-posts-and-pages/wp-duplicate-posts-and-pages.php Passed 13 tests

The primary PHP file in "WP Duplicate Posts And Pages" version 1.1 is used by WordPress to initiate all plugin functionality
54 characters long description:
Duplicate WordPress Posts easily from the admin panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1502582

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
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
There are no PNG files in this plugin