84% duplicate-pages-posts

Code Review | Duplicate Pages, Posts and CPT

WordPress plugin Duplicate Pages, Posts and CPT scored84%from 54 tests.

About plugin

  • Plugin page: duplicate-pages-p...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Aug 4, 2021
  • Number of updates: 7
  • Update frequency: every 26.7 days
  • Top authors: jonastietgen (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /11,477 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.01MB] [CPU: ▼13.05ms] Passed 4 tests

Analyzing server-side resources used by Duplicate Pages, Posts and CPT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.89 ▼5.94
Dashboard /wp-admin3.31 ▲0.0149.21 ▼0.88
Posts /wp-admin/edit.php3.36 ▲0.0147.54 ▼9.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.45 ▼34.89
Media Library /wp-admin/upload.php3.23 ▲0.0136.03 ▼1.87

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Duplicate Pages, Posts and CPT
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.43 ▲0.051.82 ▼0.1444.24 ▲0.70
Dashboard /wp-admin2,206 ▲184.88 ▼1.05113.11 ▲6.0342.79 ▼2.27
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0541.59 ▼0.1933.60 ▼2.07
Add New Post /wp-admin/post-new.php1,533 ▲923.21 ▼0.30776.66 ▲126.7454.97 ▲1.83
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0799.86 ▼7.7745.67 ▲1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

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 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_filter() in wp-content/plugins/duplicate-pages-posts/duplicate-pages-posts.php:21

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 uses markdown syntax to describe your plugin to the world
8 plugin tags: duplicate post, duplicate page, clone page, clone post, duplicate custom posts...

duplicate-pages-posts/duplicate-pages-posts.php 92% from 13 tests

This is the main PHP file of "Duplicate Pages, Posts and CPT" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.6")

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
There were no executable files found in this plugin189 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11013150
PO File181039

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes1100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/icon.png0.75KB0.48KB▼ 35.85%