93% easy-post-duplicator

Code Review | Easy Post Duplicator

WordPress plugin Easy Post Duplicator scored 93% from 54 tests.

About plugin

  • Plugin page: easy-post-duplicator
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.8.1
  • First release: Jun 15, 2017
  • Latest release: Jun 15, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: dev02ali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 837 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Easy Post Duplicator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0332.78 ▼3.94
Dashboard /wp-admin3.09 ▲0.0348.31 ▲0.74
Posts /wp-admin/edit.php3.14 ▲0.0349.80 ▼6.31
Add New Post /wp-admin/post-new.php5.44 ▲0.0197.04 ▼582.61
Media Library /wp-admin/upload.php3.03 ▲0.0333.88 ▼1.94

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Post Duplicator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.97 ▲0.6310.11 ▼2.6849.27 ▼3.93
Dashboard /wp-admin2,989 ▲586.02 ▲0.02156.43 ▼13.58115.25 ▲5.94
Posts /wp-admin/edit.php2,742 ▲32.72 ▼0.0071.85 ▼8.1495.63 ▼3.27
Add New Post /wp-admin/post-new.php1,683 ▲7918.72 ▲0.09406.10 ▼38.70116.77 ▲2.11
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.00172.45 ▼18.99129.70 ▲9.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 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/easy-post-duplicator/index.php:74

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: Screenshot #1 (How to duplicate post/page With Easy post duplicator) image missing
The official readme.txt is a good inspiration

easy-post-duplicator/index.php 92% from 13 tests

The entry point to "Easy Post Duplicator" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-post-duplicator.php" instead of "index.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
No dangerous file extensions were detected61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP120961

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png155.89KB58.05KB▼ 62.76%