84% menu-item-types

Code Review | Menu Item Types

WordPress plugin Menu Item Types scored84%from 54 tests.

About plugin

  • Plugin page: menu-item-types
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 30
  • Update frequency: every 24.9 days
  • Top authors: maxpertici (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Menu Item Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.41 ▼5.21
Dashboard /wp-admin3.31 ▲0.0042.28 ▼4.41
Posts /wp-admin/edit.php3.36 ▲0.0046.34 ▲1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.89 ▼19.64
Media Library /wp-admin/upload.php3.23 ▲0.0033.92 ▼0.30

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

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

Browser metrics Passed 4 tests

Menu Item Types: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.38 ▲0.011.58 ▼0.1540.93 ▼3.18
Dashboard /wp-admin2,198 ▲185.59 ▼0.0682.15 ▼6.0037.96 ▼3.47
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0134.83 ▲0.7033.81 ▲1.87
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▼0.48641.33 ▼78.9971.21 ▲17.66
Media Library /wp-admin/upload.php1,400 ▼34.17 ▲0.0194.86 ▼5.7941.26 ▼2.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/menu-item-types/inc/render/templates/paragraph.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/menu-item-types/inc/render/templates/nolink.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/menu-item-types/inc/render/templates/image.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/menu-item-types/inc/render/templates/heading.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

menu-item-types/menu-item-types.php Passed 13 tests

"Menu Item Types" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Use elements of a personalized type in the navigation menus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin10,860 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JSON2009,677
PHP20432211815
SVG13012136
PO File1303279
Sass126069
CSS1161042
JavaScript2333342

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin