78% woocommerce-menu-extension

Code Review | WooCommerce Menu Extension

WordPress plugin WooCommerce Menu Extension scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-menu-...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2014
  • Latest release: Jul 6, 2020
  • Number of updates: 36
  • Update frequency: every 56.5 days
  • Top authors: augustinfotech (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

4,000+ active /61,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by WooCommerce Menu Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.00 ▼5.18
Dashboard /wp-admin3.31 ▲0.0047.86 ▼8.75
Posts /wp-admin/edit.php3.36 ▲0.0047.84 ▼2.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.36 ▲2.11
Media Library /wp-admin/upload.php3.23 ▲0.0037.30 ▲0.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Menu Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.72 ▲0.341.62 ▲0.0241.54 ▼2.10
Dashboard /wp-admin2,195 ▲185.67 ▲0.0090.44 ▼6.6141.06 ▼4.49
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0641.38 ▲0.9836.94 ▼1.93
Add New Post /wp-admin/post-new.php1,529 ▲323.33 ▲0.23591.24 ▼79.7253.12 ▲2.28
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.02100.73 ▼5.4445.16 ▲0.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woocommerce-menu-extension/include/backend.inc.php
    • > /wp-content/plugins/woocommerce-menu-extension/include/frontend.inc.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woocommerce-menu-extension/woocommerce-menu-extension.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/woocommerce-menu-extension/include/edit_custom_walker.php:8
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-menu-extension/woocommerce-menu-extension.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-menu-extension/woocommerce-menu-extension.php on line 14
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-menu-extension/woocommerce-menu-extension.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please specify the plugin name on the first line ( === woocommerce-menu-extension === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The woocommerce menu in nav menu admin page.), #2 (The woocommerce menu in nav menu front page and Shortcodes Display.), #3 (The woocommerce menu setting where we have to check option to show that nav menu after login only.)
You can look at the official readme.txt

woocommerce-menu-extension/woocommerce-menu-extension.php Passed 13 tests

The main PHP script in "WooCommerce Menu Extension" version 1.6.2 is automatically included on every request by WordPress
51 characters long description:
You can now add woocommerce links in your WP menus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin624 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP410170624

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.29
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.30MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screentshot-1.png50.37KB25.23KB▼ 49.91%
screenshot-2.png126.09KB48.86KB▼ 61.25%
screenshot-1.png101.16KB51.00KB▼ 49.58%
screenshot-3.png31.48KB18.90KB▼ 39.97%