94% advanced-custom-fields-menu-field

Code Review | Advanced Custom Fields: Menu Field

WordPress plugin Advanced Custom Fields: Menu Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 5.9.2
  • First release: Nov 5, 2013
  • Latest release: Nov 6, 2013
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: danieledenobili (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 959 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Advanced Custom Fields: Menu Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0159.03 ▲4.08
Dashboard /wp-admin3.41 ▲0.0136.90 ▼4.87
Posts /wp-admin/edit.php3.64 ▲0.0139.22 ▼0.58
Add New Post /wp-admin/post-new.php6.88 ▼0.08100.74 ▼1,203.49
Media Library /wp-admin/upload.php3.30 ▲0.0024.31 ▼1.73

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Menu Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2815.67 ▼0.295.68 ▼0.162.39 ▼0.29
Dashboard /wp-admin2,874 ▲166.15 ▼0.07112.57 ▼18.91161.40 ▼6.14
Posts /wp-admin/edit.php2,691 ▲33.22 ▼0.0163.93 ▼0.29142.46 ▲3.08
Add New Post /wp-admin/post-new.php1,668 ▼018.16 ▲0.11422.22 ▲34.87168.27 ▲12.63
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.03135.59 ▼17.80185.56 ▼4.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-menu-field/acf-menu.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-menu-field/menu-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/advanced-custom-fields-menu-field/menu-v3.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


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
3 plugin tags: advanced custom fields, menu, acf

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

The primary PHP file in "Advanced Custom Fields: Menu Field" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-menu-field.php" instead of "acf-menu.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
No dangerous file extensions were detected88 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.67
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin