99% acf-nav-menu-field

Code Review | ACF Nav Menu Field

WordPress plugin ACF Nav Menu Field scored 99% from 54 tests.

About plugin

  • Plugin page: acf-nav-menu-field
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Sep 7, 2021
  • Latest release: Sep 7, 2021
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 614 total downloads

Benchmarks

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

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

An overview of server-side resources used by ACF Nav Menu Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.70 ▲3.23
Dashboard /wp-admin3.41 ▲0.0132.84 ▼1.06
Posts /wp-admin/edit.php3.64 ▲0.0135.88 ▼1.02
Add New Post /wp-admin/post-new.php6.89 ▼0.0896.16 ▼1,160.62
Media Library /wp-admin/upload.php3.30 ▲0.0023.91 ▼2.50

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

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

Browser metrics Passed 4 tests

ACF Nav Menu Field: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲1116.20 ▲0.626.28 ▲0.552.82 ▲0.55
Dashboard /wp-admin2,897 ▲366.15 ▼0.02115.98 ▼20.03156.55 ▼2.22
Posts /wp-admin/edit.php2,696 ▲53.23 ▼0.0163.01 ▼0.75141.18 ▼1.52
Add New Post /wp-admin/post-new.php1,713 ▲220.79 ▼0.73417.41 ▼18.08158.03 ▲3.26
Media Library /wp-admin/upload.php1,700 ▼15.55 ▲0.07141.38 ▼9.48183.76 ▼5.76

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 | A smoke test targeting server-side errors
Everything seems fine, however 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

acf-nav-menu-field/advanced-custom-nav-menu-field.php 85% from 13 tests

The main file in "ACF Nav Menu Field" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-nav-menu-field.php" instead of "advanced-custom-nav-menu-field.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin182 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31572170
CSS10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin