84% luckywp-acf-menu-field

Code Review | LuckyWP ACF Menu Field

WordPress plugin LuckyWP ACF Menu Field scored 84% from 54 tests.

About plugin

  • Plugin page: luckywp-acf-menu-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 5.8.1
  • First release: May 26, 2020
  • Latest release: Aug 20, 2020
  • Number of updates: 3
  • Update frequency: every 28.7 days
  • Top authors: theluckywp (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active / 7,821 total downloads

Benchmarks

Plugin footprint 82% from 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.12MB] [CPU: ▼144.47ms] 75% from 4 tests

A check of server-side resources used by LuckyWP ACF Menu Field
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 616.26ms on /wp-admin/admin.php?page=lwpamf_plugins)
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.1035.56 ▼0.01
Dashboard /wp-admin3.24 ▲0.1847.36 ▲3.83
Posts /wp-admin/edit.php3.29 ▲0.1847.42 ▲1.80
Add New Post /wp-admin/post-new.php5.54 ▲0.1092.32 ▼576.17
Media Library /wp-admin/upload.php3.12 ▲0.1134.40 ▼3.49
LuckyWP Plugins /wp-admin/admin.php?page=lwpamf_plugins3.39616.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 1 new option
New WordPress options
lwpamf_rate_time

Browser metrics Passed 4 tests

This is an overview of browser requirements for LuckyWP ACF Menu Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.97 ▲0.119.93 ▲0.5145.73 ▼9.86
Dashboard /wp-admin2,967 ▲335.90 ▼0.01134.15 ▼10.75118.11 ▲11.57
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0167.00 ▲1.2186.31 ▼2.35
Add New Post /wp-admin/post-new.php1,876 ▲19319.15 ▲0.33383.63 ▲15.33108.00 ▼10.23
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02146.25 ▲4.64116.05 ▼8.09
LuckyWP Plugins /wp-admin/admin.php?page=lwpamf_plugins2,3052.6561.8183.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • lwpamf_rate_time

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-acf-menu-field/admin/Plugins.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\ServiceLocator' not found in wp-content/plugins/luckywp-acf-menu-field/core/base/BasePlugin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function luckywp\\acfMenuField\\core\\base\\add_action() in wp-content/plugins/luckywp-acf-menu-field/core/base/BasePlugin.php:66
    • > PHP Notice
      Undefined variable: trimPrefix in wp-content/plugins/luckywp-acf-menu-field/core/pluginRate/notice.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/luckywp-acf-menu-field/core/pluginRate/notice.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/luckywp-acf-menu-field/plugin/AcfMenuField.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-acf-menu-field/core/wp/Options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-acf-menu-field/core/pluginRate/PluginRate.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-acf-menu-field/admin/Admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\acfMenuField\\core\\base\\BasePlugin' not found in wp-content/plugins/luckywp-acf-menu-field/plugin/Plugin.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: acf, menus, menu, nav menu, advanced custom fields

luckywp-acf-menu-field/luckywp-acf-menu-field.php Passed 13 tests

Analyzing the main PHP file in "LuckyWP ACF Menu Field" version 1.0
56 characters long description:
Add navigation menu field type to Advanced Custom Fields

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected915 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP18166280913
CSS1001
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.40
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods65
▷ Static methods1929.23%
▷ Public methods5889.23%
▷ Protected methods710.77%
▷ Private methods00.00%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.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
PNG images were not found in this plugin