84% ecommerce-menu

Code Review | Ecommerce Menu - WooCommerce Widget

WordPress plugin Ecommerce Menu - WooCommerce Widget scored 84% from 54 tests.

About plugin

  • Plugin page: ecommerce-menu
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.1
  • WordPress version: 5.8.1
  • First release: May 5, 2021
  • Latest release: May 5, 2021
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: samuelsilvapt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 89 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: ▲1.19MB] [CPU: ▼132.74ms] Passed 4 tests

This is a short check of server-side resources used by Ecommerce Menu - WooCommerce Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲1.2649.09 ▲28.18
Dashboard /wp-admin4.28 ▲1.2256.64 ▲12.18
Posts /wp-admin/edit.php4.33 ▲1.2252.42 ▲9.17
Add New Post /wp-admin/post-new.php6.58 ▲1.15101.38 ▼556.92
Media Library /wp-admin/upload.php4.16 ▲1.1545.29 ▲4.63
Codestar Framework /wp-admin/tools.php?page=csf-welcome4.1943.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 160 new files
Database: no new tables, 1 new option
New WordPress options
woocommerce-menu

Browser metrics Passed 4 tests

An overview of browser requirements for Ecommerce Menu - WooCommerce Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,904 ▲30816.43 ▲0.9015.23 ▲4.8149.22 ▲1.12
Dashboard /wp-admin3,054 ▲1205.93 ▼0.13138.34 ▼10.73120.01 ▲12.49
Posts /wp-admin/edit.php2,820 ▲812.71 ▼0.0061.15 ▼2.7589.49 ▲1.71
Add New Post /wp-admin/post-new.php1,741 ▲24118.27 ▼0.26345.95 ▼27.39113.50 ▼3.07
Media Library /wp-admin/upload.php1,888 ▲815.03 ▲0.01141.66 ▼22.75122.49 ▲3.21
WooCommerce Settings /wp-admin/admin.php?page=ecommerce-menu#tab=woocommerce-settings1,9214.3480.39103.13
Other Content /wp-admin/admin.php?page=ecommerce-menu#tab=other-content1,9464.5694.23107.26
Design/Appearance /wp-admin/admin.php?page=ecommerce-menu#tab=design-appearance2,3604.75104.45125.17
Codestar Framework /wp-admin/tools.php?page=csf-welcome2,0404.1580.28131.17
General /wp-admin/admin.php?page=ecommerce-menu#tab=general1,9284.1478.29107.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • woocommerce-menu

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ecommerce-menu/admin/partials/woocommerce-menu-admin-display.php
    • > /wp-content/plugins/ecommerce-menu/public/partials/woocommerce-menu-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: menu, ecommerce, woocommerce

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

"Ecommerce Menu - WooCommerce Widget" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
This plugin provides a WooCommerce Menu accessed by a Badge on the Bottom right.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected21,420 lines of code in 129 files:
LanguageFilesBlank linesComment linesLines of code
PHP802,2991,5689,454
PO File203,0373,4146,180
JSON2004,782
Sass9544481
Markdown2850379
JavaScript73456114
SVG40026
CSS5094

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity19.08
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods223
▷ Static methods3214.35%
▷ Public methods21797.31%
▷ Protected methods00.00%
▷ Private methods62.69%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/vendor/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%