84% wp-menu-custom-fields

Code Review | WP Menu Custom Fields

WordPress plugin WP Menu Custom Fields scored84%from 54 tests.

About plugin

  • Plugin page: wp-menu-custom-fi...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 14
  • Update frequency: every 88.4 days
  • Top authors: rtcamp (64.29%)pavanpatil1 (28.57%)juhise (14.29%)vaishu.agola27 (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.01ms] Passed 4 tests

Analyzing server-side resources used by WP Menu Custom Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.95 ▼10.40
Dashboard /wp-admin3.44 ▲0.1444.98 ▼4.72
Posts /wp-admin/edit.php3.56 ▲0.2046.49 ▼1.61
Add New Post /wp-admin/post-new.php6.02 ▲0.1490.65 ▼3.30
Media Library /wp-admin/upload.php3.37 ▲0.1440.77 ▲6.27

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Menu Custom Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲13713.60 ▼1.146.37 ▲4.5042.98 ▼0.75
Dashboard /wp-admin2,203 ▲125.86 ▲0.98101.47 ▼8.8140.52 ▼5.93
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.99 ▲5.2438.95 ▲0.82
Add New Post /wp-admin/post-new.php1,514 ▼3417.63 ▼0.52645.28 ▼38.0355.10 ▲1.25
Media Library /wp-admin/upload.php1,391 ▲94.25 ▲0.0394.33 ▼8.4745.34 ▼1.06

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Trait 'WP_Menu_Custom_Fields\\Inc\\Traits\\Singleton' not found in wp-content/plugins/wp-menu-custom-fields/inc/classes/class-custom-nav-menu-fields.php on line 17
    • > PHP Fatal error
      Trait 'WP_Menu_Custom_Fields\\Inc\\Traits\\Singleton' not found in wp-content/plugins/wp-menu-custom-fields/inc/classes/class-assets.php on line 15
    • > PHP Fatal error
      Trait 'WP_Menu_Custom_Fields\\Inc\\Traits\\Singleton' not found in wp-content/plugins/wp-menu-custom-fields/inc/classes/class-plugin.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wp-menu-custom-fields/wp-menu-custom-fields.php:16

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: navigation menu, navigation menu custom fields

wp-menu-custom-fields/wp-menu-custom-fields.php Passed 13 tests

This is the main PHP file of "WP Menu Custom Fields" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
Adds custom fields on menu items under Appearance -> Menus and shows it on front-end.

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 detected1,035 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP6132302426
JavaScript770104323
Sass3259133
JSON200110
PO File1141841
CSS2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.25
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity5.06
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods738.89%
▷ Protected methods738.89%
▷ Private methods422.22%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 6.99MB with 5.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-8.png1,118.55KB242.14KB▼ 78.35%
screenshots/screenshot-7.png969.59KB266.03KB▼ 72.56%
screenshots/screenshot-6.png652.83KB122.96KB▼ 81.16%
screenshots/screenshot-9.png473.59KB67.13KB▼ 85.83%
screenshots/screenshot-4.png606.91KB100.47KB▼ 83.45%