94% term-duplicator

Code Review | Term Duplicator

WordPress plugin Term Duplicator scored 94% from 53 tests.

About plugin

  • Plugin page: term-duplicator
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.2
  • WordPress version: 5.8.1
  • First release: Sep 18, 2014
  • Latest release: Jul 28, 2016
  • Number of updates: 6
  • Update frequency: every 148.2 days
  • Top authors: clifgriffin (100%)

Code review

53 tests

User reviews

5 reviews

Install metrics

1,000+ active / 6,314 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Term Duplicator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.31 ▲13.10
Dashboard /wp-admin3.08 ▲0.0353.24 ▲14.50
Posts /wp-admin/edit.php3.13 ▲0.0243.78 ▼2.54
Add New Post /wp-admin/post-new.php5.44 ▲0.0191.75 ▼1,353.69
Media Library /wp-admin/upload.php3.02 ▲0.0132.25 ▼7.35

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Term Duplicator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲9715.93 ▲0.388.85 ▲0.1450.26 ▲1.71
Dashboard /wp-admin2,959 ▲1075.92 ▲0.05144.91 ▼8.26109.32 ▲6.03
Posts /wp-admin/edit.php2,706 ▼02.70 ▲0.0164.64 ▲0.8897.98 ▼0.13
Add New Post /wp-admin/post-new.php1,851 ▲19817.62 ▼1.11359.80 ▼23.16105.29 ▼7.62
Media Library /wp-admin/upload.php1,775 ▼05.01 ▼0.00165.56 ▼2.15114.16 ▼4.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/term-duplicator/term-duplicator.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === term-duplicator === )
You can take inspiration from this readme.txt

term-duplicator/term-duplicator.php Passed 13 tests

The principal PHP file in "Term Duplicator" v. 1.0.0 is loaded by WordPress automatically on each request
64 characters long description:
Duplicate any category, tag, or custom taxonomy term, instantly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin43 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1152235
Markdown1208

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin