78% woo-menu

Code Review | Woo Menu

WordPress plugin Woo Menu scored78%from 54 tests.

About plugin

  • Plugin page: woo-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Mar 22, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.24ms] Passed 4 tests

Server-side resources used by Woo Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.99 ▲6.25
Dashboard /wp-admin3.36 ▲0.0248.53 ▼10.56
Posts /wp-admin/edit.php3.48 ▲0.1247.37 ▼9.02
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.38 ▼9.86
Media Library /wp-admin/upload.php3.29 ▲0.0635.77 ▲0.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_woocommerce_menu_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.21 ▼0.141.60 ▼0.1244.29 ▲2.69
Dashboard /wp-admin2,192 ▲185.63 ▼0.0787.83 ▼9.4141.51 ▲2.57
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0636.20 ▼6.6033.18 ▼3.11
Add New Post /wp-admin/post-new.php1,537 ▲918.17 ▼5.15658.44 ▼24.2679.56 ▲14.21
Media Library /wp-admin/upload.php1,397 ▼34.09 ▼0.09104.26 ▼2.8845.32 ▼1.31

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 detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_woocommerce_menu_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-menu/style.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-menu/menu-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-menu/functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1), #2 (screenshot-2), #3 (screenshot-3)
The official readme.txt might help

woo-menu/woo-menu.php 92% from 13 tests

"Woo Menu" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin236 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54183236

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.67
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin