100% acf-button

Code Review | Advanced Custom Fields: Button Field

WordPress plugin Advanced Custom Fields: Button Field scored 100% from 54 tests.

About plugin

  • Plugin page: acf-button
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 5.8.1
  • First release: Jul 13, 2017
  • Latest release: Jul 14, 2021
  • Number of updates: 21
  • Update frequency: every 69.9 days
  • Top authors: circlecube (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 3,125 total downloads


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
Install script ran successfully

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

This is a short check of server-side resources used by Advanced Custom Fields: Button Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.74 ▲19.19
Dashboard /wp-admin3.07 ▲0.0151.17 ▲13.73
Posts /wp-admin/edit.php3.12 ▲0.0148.22 ▲6.24
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.84 ▼570.03
Media Library /wp-admin/upload.php3.01 ▲0.0136.38 ▲0.34

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Button Field
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.83 ▼0.109.45 ▼0.5451.84 ▲2.58
Dashboard /wp-admin2,973 ▲395.91 ▼0.08140.38 ▼15.87117.35 ▼9.05
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0264.80 ▼7.2288.65 ▼3.61
Add New Post /wp-admin/post-new.php1,604 ▼7918.81 ▲0.47374.93 ▼38.55113.01 ▼0.87
Media Library /wp-admin/upload.php1,807 ▼04.99 ▼0.01160.02 ▼4.89135.08 ▲12.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration Passed 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
10 plugin tags: link, button, page, pages, post...

acf-button/acf-button.php Passed 13 tests

The entry point to "Advanced Custom Fields: Button Field" version 1.7.3 is a PHP file that has certain tags in its header comment area
48 characters long description:
Adds a simple yet featured button field for ACF.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected719 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity41.00
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity12.43
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png6.88KB3.46KB▼ 49.79%
assets/icon-128x128.png5.27KB2.72KB▼ 48.28%
assets/banner-772x250.png70.88KB31.61KB▼ 55.40%