84% advanced-custom-fields-menu-field-add-on

Code Review | Advanced Custom Fields - Menu Field add-on

WordPress plugin Advanced Custom Fields - Menu Field add-on scored84%from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2012
  • Latest release: Nov 27, 2012
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: chriswessels (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Advanced Custom Fields - Menu Field add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0244.74 ▲0.16
Dashboard /wp-admin3.59 ▲0.0251.57 ▼4.81
Posts /wp-admin/edit.php3.70 ▲0.0255.51 ▲2.08
Add New Post /wp-admin/post-new.php6.17 ▲0.0296.48 ▼6.34
Media Library /wp-admin/upload.php3.51 ▲0.0239.92 ▼5.61

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields - Menu Field add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.75 ▲0.381.75 ▼0.3840.42 ▼7.52
Dashboard /wp-admin2,189 ▲125.58 ▼0.1290.05 ▼8.7337.45 ▼7.15
Posts /wp-admin/edit.php2,097 ▼02.01 ▼0.0239.69 ▲0.6838.84 ▼0.23
Add New Post /wp-admin/post-new.php1,531 ▲523.30 ▲5.70637.22 ▼36.8863.85 ▲9.38
Media Library /wp-admin/upload.php1,391 ▼94.19 ▼0.03111.72 ▲7.6145.38 ▼2.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-menu-field-add-on/menu_field.php:190

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

advanced-custom-fields-menu-field-add-on/menu_field.php 92% from 13 tests

This is the main PHP file of "Advanced Custom Fields - Menu Field add-on" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-custom-fields-menu-field-add-on.php" instead of "menu_field.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin159 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11625159

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.00
▷ Minimum class complexity3.00
▷ Maximum class complexity11.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin