78% menu-export

Code Review | Menu export

WordPress plugin Menu export scored78%from 54 tests.

About plugin

  • Plugin page: menu-export
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jun 20, 2019
  • Number of updates: 23
  • Update frequency: every 41.4 days
  • Top authors: guilro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /7,168 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.00ms] Passed 4 tests

Analyzing server-side resources used by Menu export
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.44 ▲2.20
Dashboard /wp-admin3.38 ▲0.0844.39 ▼1.33
Posts /wp-admin/edit.php3.50 ▲0.1445.00 ▼3.20
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.61 ▼1.66
Media Library /wp-admin/upload.php3.31 ▲0.0837.67 ▲4.24
Menu Export /wp-admin/options-general.php?page=menu-export/menu-export.php3.2730.77

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Menu export: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.101.83 ▲0.2643.83 ▲6.74
Dashboard /wp-admin2,207 ▲195.82 ▲0.9193.20 ▼10.2737.23 ▼6.27
Posts /wp-admin/edit.php2,090 ▲42.03 ▲0.0233.92 ▼3.5137.60 ▲2.26
Add New Post /wp-admin/post-new.php1,536 ▲2223.21 ▲5.70580.71 ▼12.1451.88 ▲2.55
Media Library /wp-admin/upload.php1,392 ▲44.31 ▲0.0098.35 ▲2.1040.82 ▼1.78
Menu Export /wp-admin/options-general.php?page=menu-export/menu-export.php7612.0223.4226.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/menu-export/menu-export.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/menu-export/includes/bs3_nav_walker.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/menu-export/includes/bs4_nav_walker.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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 your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === menu-export === )
The official readme.txt might help

menu-export/menu-export.php Passed 13 tests

"Menu export" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
67 characters long description:
Menu Export allows you to embed your menu markup on other websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin429 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP352355429

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity40.67
▷ Minimum class complexity13.00
▷ Maximum class complexity74.00
Average method complexity7.61
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin