100% advanced-custom-fields-nav-menu-field

Code Review | Advanced Custom Fields: Nav Menu Field

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

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 5.8.1
  • First release: May 9, 2013
  • Latest release: Oct 15, 2014
  • Number of updates: 17
  • Update frequency: every 31.1 days
  • Top authors: Faison (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

10,000+ active / 76,231 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Advanced Custom Fields: Nav Menu Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.78 ▲13.12
Dashboard /wp-admin3.07 ▲0.0150.71 ▲5.35
Posts /wp-admin/edit.php3.12 ▲0.0146.51 ▼2.02
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.69 ▼562.26
Media Library /wp-admin/upload.php3.01 ▲0.0134.34 ▲3.32

Server storage [IO: ▲0.02MB] [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

Advanced Custom Fields: Nav Menu Field: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8215.95 ▲0.037.49 ▼0.4849.92 ▲3.10
Dashboard /wp-admin2,967 ▲365.90 ▼0.00150.89 ▲1.52114.14 ▼2.29
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0280.69 ▲9.1093.16 ▼0.03
Add New Post /wp-admin/post-new.php1,500 ▼18318.89 ▲0.07377.60 ▼1.60112.64 ▼8.63
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.02153.65 ▼7.67125.39 ▼0.24

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 Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: advanced custom fields, navigation, acf4, acf5, nav menu...

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

The principal PHP file in "Advanced Custom Fields: Nav Menu Field" v. 2.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-nav-menu-field.php" instead of "fz-acf-nav-menu.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
No dangerous file extensions were detected270 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP363120270

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG images were found in this plugin