84% acf-link-picker-field

Code Review | Advanced Custom Fields: Link Picker Field

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

About plugin

  • Plugin page: acf-link-picker-f...
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Sep 18, 2015
  • Latest release: Dec 8, 2016
  • Number of updates: 20
  • Update frequency: every 31.5 days
  • Top authors: caalami (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /14,773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.16ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Fields: Link Picker Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.03 ▼3.74
Dashboard /wp-admin3.31 ▲0.0150.68 ▼5.12
Posts /wp-admin/edit.php3.36 ▲0.0147.26 ▼12.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.64 ▼7.75
Media Library /wp-admin/upload.php3.24 ▲0.0137.11 ▲0.93

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

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

Browser metrics Passed 4 tests

Advanced Custom Fields: Link Picker Field: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.36 ▼0.191.84 ▲0.0244.34 ▲3.08
Dashboard /wp-admin2,195 ▲155.61 ▲0.0190.09 ▲1.6341.09 ▼1.52
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0035.46 ▼3.3635.78 ▼0.98
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▲0.02682.41 ▼7.0453.68 ▲2.76
Media Library /wp-admin/upload.php1,403 ▲94.29 ▲0.1499.95 ▼34.1644.48 ▼0.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 no errors were found, this is by no means 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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/acf-link-picker-field/acf-link_picker.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-link-picker-field/acf-link_picker-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-link-picker-field/acf-link_picker-v4.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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: acf link picker, advanced custom fields, acf, link chooser, link picker

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

The main PHP file in "Advanced Custom Fields: Link Picker Field" ver. 1.2.8 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-link-picker-field.php" instead of "acf-link_picker.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
Everything looks great! No dangerous files found in this plugin531 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP3263590237
JavaScript15446173
PO File3350109
Markdown48012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.29
▷ 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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin