84% bew-menu-cart

Code Review | BEW Menu Cart

WordPress plugin BEW Menu Cart scored84%from 54 tests.

About plugin

  • Plugin page: bew-menu-cart
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2018
  • Latest release: Apr 2, 2018
  • Number of updates: 18
  • Update frequency: every 4.3 days
  • Top authors: dgovea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /9,129 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by BEW Menu Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.01 ▲2.53
Dashboard /wp-admin3.35 ▲0.0451.34 ▼1.61
Posts /wp-admin/edit.php3.46 ▲0.1047.15 ▼4.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.63 ▼12.32
Media Library /wp-admin/upload.php3.27 ▲0.0435.53 ▼3.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for BEW Menu Cart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.64 ▼0.0845.20 ▲2.23
Dashboard /wp-admin2,198 ▲185.59 ▲0.0488.91 ▼8.0440.76 ▼0.27
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0634.86 ▼4.7332.97 ▼0.61
Add New Post /wp-admin/post-new.php1,529 ▲323.13 ▲0.26666.32 ▲60.5951.83 ▼7.06
Media Library /wp-admin/upload.php1,394 ▼94.19 ▲0.0694.42 ▼20.3345.86 ▼2.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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Briefcase\\add_filter() in wp-content/plugins/bew-menu-cart/includes/woo-config.php:21

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: briefcasewp, easy digital download, woocommerce, widgets, elementor

bew-menu-cart/bew-menu-cart.php 85% from 13 tests

"BEW Menu Cart" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "4.9.0")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin8,893 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS7258854,145
SVG2002,687
PHP52731601,197
Sass11370835
JavaScript111829

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.50
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods412.90%
▷ Private methods13.23%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin