68% wp-group-menu

Code Review | WP Group Menu

WordPress plugin WP Group Menu scored68%from 54 tests.

About plugin

  • Plugin page: wp-group-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 10, 2014
  • Latest release: Jul 2, 2018
  • Number of updates: 11
  • Update frequency: every 135.2 days
  • Top authors: kevon.adonis (81.82%)vspider (27.27%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,803 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.56ms] Passed 4 tests

A check of server-side resources used by WP Group Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.99 ▼5.16
Dashboard /wp-admin3.32 ▲0.0251.89 ▲1.41
Posts /wp-admin/edit.php3.37 ▲0.0143.57 ▼10.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.91 ▼11.56
Media Library /wp-admin/upload.php3.24 ▲0.0138.20 ▲0.78
Manage /wp-admin/admin.php?page=wpgroupmenu&tab=manage3.2635.62
Help /wp-admin/admin.php?page=wpgroupmenu&tab=help3.2334.13
Settings /wp-admin/admin.php?page=wpgroupmenu&tab=settings3.2829.35

Server storage [IO: ▲0.17MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: 1 new table, 12 new options
New tables
wp_wpgroupmenu_sites
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
wpgroupmenu_font_color
widget_recent-comments
can_compress_scripts
widget_recent-posts
wpgroupmenu_background_color
wpgroupmenu_active_font_color
db_upgraded
wpgroupmenu_active_background_color
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Group Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲23413.63 ▼0.956.05 ▲4.2641.56 ▼0.41
Dashboard /wp-admin2,222 ▲344.87 ▼0.01115.36 ▲8.6984.58 ▲42.28
Posts /wp-admin/edit.php2,117 ▲252.05 ▲0.0537.20 ▼2.1533.34 ▼3.43
Add New Post /wp-admin/post-new.php1,693 ▲17422.15 ▼1.14774.67 ▲67.4656.68 ▲2.08
Media Library /wp-admin/upload.php1,416 ▲284.17 ▼0.06106.14 ▲6.0284.74 ▲38.11
Manage /wp-admin/admin.php?page=wpgroupmenu&tab=manage1,0452.1326.9935.63
Help /wp-admin/admin.php?page=wpgroupmenu&tab=help8842.1228.5529.54
Settings /wp-admin/admin.php?page=wpgroupmenu&tab=settings1,1692.3941.7228.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpgroupmenu_sites
  • The uninstall procedure has failed, leaving 12 options in the database
    • widget_recent-comments
    • wpgroupmenu_active_font_color
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • wpgroupmenu_active_background_color
    • wpgroupmenu_font_color
    • wpgroupmenu_alignment
    • ...

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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-group-menu/wpgroupmenu_settings.php
    • > /wp-content/plugins/wp-group-menu/wpgroupmenu.php
    • > /wp-content/plugins/wp-group-menu/wpgroupmenu_help.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(WPGROUPMENU_PLUGIN_DIRwpgroupmenu_class.php): failed to open stream: No such file or directory in wp-content/plugins/wp-group-menu/wpgroupmenu_manage.php on line 3
    • > PHP Warning
      Use of undefined constant WPGROUPMENU_PLUGIN_DIR - assumed 'WPGROUPMENU_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-group-menu/wpgroupmenu_manage.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WPGROUPMENU_PLUGIN_DIRwpgroupmenu_class.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-group-menu/wpgroupmenu_manage.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-group-menu/wpgroupmenu_class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

wp-group-menu/wpgroupmenu.php 92% from 13 tests

The entry point to "WP Group Menu" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-group-menu.php" instead of "wpgroupmenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,142 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23371941,948
PHP65127604
CSS34938550
Markdown129040

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.10KB0.24KB▼ 78.08%
images/admin_logo.png9.74KB5.73KB▼ 41.20%