94% acf-field-name-copier

Code Review | Advanced Custom Fields : Field Name Copier

WordPress plugin Advanced Custom Fields : Field Name Copier scored 94% from 54 tests.

About plugin

  • Plugin page: acf-field-name-co...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.2
  • WordPress version: 5.9.2
  • First release: Dec 12, 2017
  • Latest release: Jun 13, 2019
  • Number of updates: 11
  • Update frequency: every 49.8 days
  • Top authors: Tusko Trush (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 641 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Advanced Custom Fields : Field Name Copier
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.57 ▲7.44
Dashboard /wp-admin3.41 ▲0.0033.60 ▼1.34
Posts /wp-admin/edit.php3.64 ▲0.0039.30 ▲0.20
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.52 ▼1,142.76
Media Library /wp-admin/upload.php3.29 ▼0.0122.85 ▼7.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields : Field Name Copier
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1416.20 ▲0.595.98 ▲0.262.24 ▼0.44
Dashboard /wp-admin2,894 ▲366.11 ▼0.07120.01 ▼13.88159.60 ▲5.00
Posts /wp-admin/edit.php2,692 ▲53.24 ▼0.0063.90 ▲0.52140.38 ▼3.16
Add New Post /wp-admin/post-new.php1,663 ▲216.52 ▼0.04410.26 ▲17.60149.79 ▼10.87
Media Library /wp-admin/upload.php1,702 ▲75.58 ▲0.05141.82 ▼6.05189.96 ▼7.13

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
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/acf-field-name-copier/plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === acf-field-name-copier === )
You can look at the official readme.txt

acf-field-name-copier/plugin.php 92% from 13 tests

The main PHP script in "Advanced Custom Fields : Field Name Copier" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-field-name-copier.php" instead of "plugin.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
There were no executable files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP122522

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin