89% acf-nav-menu-field

Code Review | ACF Nav Menu Field

WordPress plugin ACF Nav Menu Field scored89%from 54 tests.

About plugin

  • Plugin page: acf-nav-menu-field
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Nov 4, 2022
  • Number of updates: 6
  • Update frequency: every 71.3 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /3,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check 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.46 ▲0.0043.76 ▲0.15
Dashboard /wp-admin3.31 ▲0.0046.91 ▼3.85
Posts /wp-admin/edit.php3.36 ▲0.0045.78 ▼4.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.76 ▼13.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.12 ▼1.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ACF Nav Menu Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.15 ▼1.211.96 ▼0.8245.09 ▼1.49
Dashboard /wp-admin2,203 ▲155.80 ▲0.8898.38 ▼20.8338.08 ▼7.80
Posts /wp-admin/edit.php2,089 ▲32.12 ▲0.0737.58 ▲0.4633.48 ▼0.63
Add New Post /wp-admin/post-new.php1,533 ▼523.04 ▲0.05677.53 ▲66.5653.21 ▼4.33
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0597.92 ▼11.9345.49 ▲2.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Requires php: The plugin version is formatted incorrectly
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

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

"ACF Nav Menu Field" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-nav-menu-field.php" instead of "advanced-custom-nav-menu-field.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected189 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32072177
CSS10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected