100% advanced-custom-fields-widget-area-field

Code Review | Advanced Custom Fields: Widget Area Field

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

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 5.9.2
  • First release: Aug 23, 2013
  • Latest release: Oct 12, 2014
  • Number of updates: 4
  • Update frequency: every 103.8 days
  • Top authors: dustyf (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 10,705 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Advanced Custom Fields: Widget Area Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0158.02 ▲8.71
Dashboard /wp-admin3.41 ▲0.0036.82 ▲1.75
Posts /wp-admin/edit.php3.64 ▲0.0048.97 ▲9.49
Add New Post /wp-admin/post-new.php6.88 ▼0.0995.16 ▼1,189.79
Media Library /wp-admin/upload.php3.29 ▲0.0024.17 ▼2.30

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Widget Area Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲5215.78 ▲0.006.26 ▲0.272.76 ▼0.20
Dashboard /wp-admin2,895 ▲346.03 ▼0.21115.47 ▼33.87154.97 ▼11.90
Posts /wp-admin/edit.php2,685 ▼33.24 ▼0.0170.35 ▲5.06144.21 ▼25.44
Add New Post /wp-admin/post-new.php1,685 ▼7519.84 ▼2.93443.96 ▲2.20162.86 ▼14.09
Media Library /wp-admin/upload.php1,694 ▼45.43 ▼0.09190.70 ▲44.00189.70 ▼16.14

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
This plugin's uninstaller ran successfully

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 no errors were found, this is by no means 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 96% 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
8 plugin tags: sidebars, widgets, widget, acf, sidebar...

advanced-custom-fields-widget-area-field/acf-widget-area.php 92% from 13 tests

The main file in "Advanced Custom Fields: Widget Area Field" v. 1.0.0 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: It is recommended to name the main PHP file as the plugin slug ("advanced-custom-fields-widget-area-field.php" instead of "acf-widget-area.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
There were no executable files found in this plugin214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.33
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods17.69%
▷ Public methods13100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected