94% advanced-custom-fields-link-picker-field

Code Review | Advanced Custom Fields: Link Picker Field

WordPress plugin Advanced Custom Fields: Link Picker Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.1
  • WordPress version: 5.9.2
  • First release: Jul 22, 2014
  • Latest release: Jan 22, 2016
  • Number of updates: 5
  • Update frequency: every 109.8 days
  • Top authors: BIOSTALL (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 11,192 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Advanced Custom Fields: Link Picker Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4051.68 ▲32.40
Dashboard /wp-admin3.42 ▲0.0132.77 ▼1.35
Posts /wp-admin/edit.php3.65 ▲0.0136.66 ▲1.45
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.95 ▼1,184.81
Media Library /wp-admin/upload.php3.30 ▲0.0024.00 ▼3.53

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Link Picker Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,775 ▲2015.78 ▼0.166.20 ▲0.371.91 ▼0.76
Dashboard /wp-admin2,878 ▲176.13 ▼0.01120.31 ▼15.38153.04 ▼14.85
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0062.01 ▼0.93142.06 ▲1.70
Add New Post /wp-admin/post-new.php1,668 ▼4318.14 ▼2.42384.92 ▼52.86160.96 ▼1.84
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.06148.56 ▼10.77187.74 ▲0.15

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
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-link-picker-field/acf-link_picker-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-link-picker-field/acf-link_picker-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/advanced-custom-fields-link-picker-field/acf-link_picker.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: advanced custom fields, acf, link picker, acf link picker, link chooser

advanced-custom-fields-link-picker-field/acf-link_picker.php 92% from 13 tests

The main file in "Advanced Custom Fields: Link Picker Field" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-custom-fields-link-picker-field.php" instead of "acf-link_picker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin478 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP3258579221
JavaScript14038136
PO File3350109
Markdown48012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.50
▷ Minimum class complexity11.00
▷ Maximum class complexity12.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin