84% nutsforpress-duplicate-any-posts

Code Review | NutsForPress Duplicate Any Post

WordPress plugin NutsForPress Duplicate Any Post scored84%from 54 tests.

About plugin

  • Plugin page: nutsforpress-dupl...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2022
  • Latest release: Aug 4, 2023
  • Number of updates: 8
  • Update frequency: every 37.6 days
  • Top authors: Christian Gatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /431 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
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.31ms] Passed 4 tests

A check of server-side resources used by NutsForPress Duplicate Any Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.37 ▲4.33
Dashboard /wp-admin3.42 ▲0.1245.56 ▼1.29
Posts /wp-admin/edit.php3.54 ▲0.1849.40 ▼9.58
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.82 ▼5.64
Media Library /wp-admin/upload.php3.35 ▲0.1236.14 ▲3.27
NutsForPress /wp-admin/admin.php?page=nfproot-settings3.3129.89
Duplicate Any Posts /wp-admin/admin.php?page=nfpdap-settings3.3432.64

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for NutsForPress Duplicate Any Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.75 ▼0.691.83 ▼0.1743.13 ▲1.83
Dashboard /wp-admin2,242 ▲514.84 ▼0.05113.99 ▲11.4042.59 ▼1.89
Posts /wp-admin/edit.php2,128 ▲392.06 ▲0.0742.15 ▲1.2936.25 ▼3.67
Add New Post /wp-admin/post-new.php1,556 ▲3718.29 ▼4.70608.47 ▲11.8349.93 ▲1.54
Media Library /wp-admin/upload.php1,427 ▲394.26 ▲0.06100.83 ▼1.5140.51 ▼3.56
NutsForPress /wp-admin/admin.php?page=nfproot-settings8092.0924.6727.69
Duplicate Any Posts /wp-admin/admin.php?page=nfpdap-settings8592.0724.7828.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following items
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/admin/includes/nfpdap-add-duplication-link.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/admin/includes/nfpdap-duplication.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/root/nfproot-styles-and-scripts.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/includes/nfpdap-plugin-deactivate.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/root/nfproot-save-settings.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/root/nfproot-settings-structure.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/admin/nfpdap-settings-content.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/nuts-for-press-duplicate-any-posts.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/root/nfproot-settings.php
    • > /wp-content/plugins/nutsforpress-duplicate-any-posts/includes/nfpdap-plugin-uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires php: Version format is invalid
You can look at the official readme.txt

nutsforpress-duplicate-any-posts/nuts-for-press-duplicate-any-posts.php 92% from 13 tests

The main PHP file in "NutsForPress Duplicate Any Post" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nutsforpress-duplicate-any-posts.php" instead of "nuts-for-press-duplicate-any-posts.php")

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 plugin1,282 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP137871811,034
JavaScript29750136
CSS1291112

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin