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

Code Review | Advanced Custom Fields: Link Picker Field

WordPress plugin Advanced Custom Fields: Link Picker Field scored 84% 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: 6.3.1
  • 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

900+ active / 12,216 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼3.77ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields: Link Picker Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.65 ▼3.13
Dashboard /wp-admin3.31 ▲0.0148.59 ▲2.89
Posts /wp-admin/edit.php3.36 ▲0.0144.46 ▼0.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.30 ▼8.31
Media Library /wp-admin/upload.php3.23 ▲0.0033.51 ▼2.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Link Picker Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.47 ▲0.081.76 ▲0.2743.12 ▲1.99
Dashboard /wp-admin2,209 ▲215.86 ▲0.96107.20 ▲4.8043.99 ▲0.00
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0334.52 ▼3.0832.47 ▼1.96
Add New Post /wp-admin/post-new.php1,534 ▲1523.05 ▼0.26651.56 ▼31.2753.27 ▼14.93
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0393.16 ▼7.1440.97 ▼5.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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: 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: 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
No browser issues were found

Optimizations

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
5 plugin tags: acf link picker, link chooser, advanced custom fields, acf, link picker

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

The main PHP script in "Advanced Custom Fields: Link Picker Field" version 1.1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as 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 | An overview of files in this plugin; executable files are not 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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin