84% acf-url-field-add-on

Code Review | ACF - URL Field Add-On

WordPress plugin ACF - URL Field Add-On scored84%from 54 tests.

About plugin

  • Plugin page: acf-url-field-add-on
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Sep 6, 2016
  • Number of updates: 4
  • Update frequency: every 17.0 days
  • Top authors: joharyjoox (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /1,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by ACF - URL Field Add-On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.47 ▲2.78
Dashboard /wp-admin3.31 ▼0.0448.85 ▼11.59
Posts /wp-admin/edit.php3.36 ▲0.0044.87 ▲0.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.29 ▼13.96
Media Library /wp-admin/upload.php3.23 ▲0.0035.99 ▲3.89

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for ACF - URL Field Add-On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.80 ▲0.561.67 ▼0.0544.23 ▲3.87
Dashboard /wp-admin2,212 ▲274.91 ▼1.11113.07 ▲7.6841.41 ▼6.05
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0836.19 ▼6.4832.02 ▼3.51
Add New Post /wp-admin/post-new.php1,521 ▲423.05 ▲5.46611.95 ▼42.2455.77 ▲5.29
Media Library /wp-admin/upload.php1,392 ▲44.32 ▲0.1197.21 ▲0.4840.56 ▼3.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-url-field-add-on/acf-url-field-add-on.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: link field, custom field, acf

acf-url-field-add-on/acf-url-field-add-on.php 85% from 13 tests

The principal PHP file in "ACF - URL Field Add-On" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin601 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27268339
JavaScript24149167
PO File26010695

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity9.33
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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
PNG images were not found in this plugin