79% menu-in-post

Code Review | Menu In Post

WordPress plugin Menu In Post scored79%from 54 tests.

About plugin

  • Plugin page: menu-in-post
  • Plugin version: 1.2.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 11, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 40
  • Update frequency: every 44.2 days
  • Top authors: linux4me2 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /27,162 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.01MB] [CPU: ▼0.13ms] Passed 4 tests

An overview of server-side resources used by Menu In Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.32 ▼1.40
Dashboard /wp-admin3.32 ▲0.0254.51 ▲6.94
Posts /wp-admin/edit.php3.38 ▲0.0248.64 ▲0.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.07 ▼3.66
Media Library /wp-admin/upload.php3.25 ▲0.0235.07 ▲3.72
Menu In Post Tools /wp-admin/tools.php?page=menu-in-post3.2230.55
Menu In Post /wp-admin/options-general.php?page=menu-in-post-options3.2229.61

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Menu In Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15713.40 ▼0.959.23 ▲7.6241.33 ▼2.47
Dashboard /wp-admin2,203 ▲235.47 ▼0.0886.49 ▼6.7437.17 ▼7.63
Posts /wp-admin/edit.php2,108 ▲81.95 ▼0.0640.73 ▲3.8336.42 ▲3.40
Add New Post /wp-admin/post-new.php1,541 ▲623.29 ▲0.19669.64 ▲20.5563.68 ▲6.05
Media Library /wp-admin/upload.php1,399 ▼44.18 ▼0.0798.47 ▼3.5843.48 ▼1.23
Menu In Post Tools /wp-admin/tools.php?page=menu-in-post8591.6534.0930.39
Menu In Post /wp-admin/options-general.php?page=menu-in-post-options9031.6625.1730.97

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: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/menu-in-post/menu-in-post.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-in-post/admin/admin.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: shortcode, menu in page, menu in post, display menu, menu

menu-in-post/menu-in-post.php Passed 13 tests

The entry point to "Menu In Post" version 1.2.6 is a PHP file that has certain tags in its header comment area
60 characters long description:
A simple but flexible plugin to add menus to a post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,287 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP4732171,138
JavaScript45492
CSS213257

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.33
▷ Minimum class complexity5.00
▷ Maximum class complexity20.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin