84% acf-unique-id-field

Code Review | Advanced Custom Fields: Unique ID Field

WordPress plugin Advanced Custom Fields: Unique ID Field scored84%from 54 tests.

About plugin

  • Plugin page: acf-unique-id-field
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2014
  • Latest release: Dec 5, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: KLicheR (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /15,033 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.02ms] Passed 4 tests

Server-side resources used by Advanced Custom Fields: Unique ID Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.39 ▼3.99
Dashboard /wp-admin3.31 ▲0.0044.99 ▼4.44
Posts /wp-admin/edit.php3.36 ▲0.0046.38 ▼0.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.71 ▼1.36
Media Library /wp-admin/upload.php3.23 ▲0.0030.58 ▼2.28

Server storage [IO: ▲0.00MB] [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, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields: Unique ID Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.081.63 ▼0.1637.91 ▼1.14
Dashboard /wp-admin2,203 ▲155.83 ▲1.0094.62 ▼12.8739.58 ▼4.19
Posts /wp-admin/edit.php2,089 ▲32.00 ▼0.0239.50 ▲2.9434.62 ▲0.80
Add New Post /wp-admin/post-new.php1,535 ▲222.95 ▼0.06636.81 ▲13.9169.13 ▲4.48
Media Library /wp-admin/upload.php1,388 ▲64.21 ▲0.0195.50 ▼4.5742.98 ▼0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/acf-unique-id-field/acf-unique_id.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-unique-id-field/acf-unique_id-v5.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: acf, id, unique

acf-unique-id-field/acf-unique_id.php 92% from 13 tests

The main PHP script in "Advanced Custom Fields: Unique ID Field" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-unique-id-field.php" instead of "acf-unique_id.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin46 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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