83% menu-cart-divi

Code Review | Menu Cart Divi

WordPress plugin Menu Cart Divi scored83%from 54 tests.

About plugin

  • Plugin page: menu-cart-divi
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2021
  • Latest release: Jun 3, 2023
  • Number of updates: 9
  • Update frequency: every 78.7 days
  • Top authors: themeythemes (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /7,702 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.58ms] Passed 4 tests

This is a short check of server-side resources used by Menu Cart Divi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.03 ▲0.23
Dashboard /wp-admin3.35 ▲0.0153.44 ▼14.01
Posts /wp-admin/edit.php3.40 ▲0.0548.43 ▼4.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.66 ▼16.22
Media Library /wp-admin/upload.php3.28 ▲0.0539.72 ▲4.95

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
lwpdm_menu_cart_activation_time
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Menu Cart Divi
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.23 ▼1.061.95 ▲0.0444.17 ▼4.40
Dashboard /wp-admin2,222 ▲375.86 ▲0.00104.02 ▼1.7340.75 ▲0.52
Posts /wp-admin/edit.php2,102 ▲132.01 ▼0.0536.70 ▼3.7432.78 ▼6.69
Add New Post /wp-admin/post-new.php1,549 ▲1623.30 ▲0.08656.83 ▲25.5960.85 ▲2.52
Media Library /wp-admin/upload.php1,404 ▲194.22 ▲0.0796.96 ▼5.2443.45 ▲1.00

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 were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • lwpdm_menu_cart_activation_time
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/menu-cart-divi/includes/modules/MenuCart/MenuCart.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/menu-cart-divi/includes/MenuCartModuleDivi.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-cart-divi/menu-cart-module-divi.php:38

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in menu-cart-divi/assets to your readme.txt
You can take inspiration from this readme.txt

menu-cart-divi/menu-cart-module-divi.php 85% from 13 tests

The principal PHP file in "Menu Cart Divi" v. 1.1 is loaded by WordPress automatically on each request
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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("menu-cart-divi.php" instead of "menu-cart-module-divi.php")

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
Everything looks great! No dangerous files found in this plugin896 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
Markdown12130454
PHP413666437
CSS3003
JavaScript2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected