89% wp-menu-cart

Code Review | WP Menu Cart

WordPress plugin WP Menu Cart scored89%from 54 tests.

About plugin

  • Plugin page: wp-menu-cart
  • Plugin version: 2.14.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: May 8, 2013
  • Latest release: Nov 8, 2023
  • Number of updates: 100
  • Update frequency: every 38.5 days
  • Top authors: wpovernight (43%)pomegranate (34%)jprummer (25%)

Code review

54 tests

User reviews

21 reviews

Install metrics

9,000+ active /243,039 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
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.18ms] Passed 4 tests

A check of server-side resources used by WP Menu Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2438.98 ▼0.54
Dashboard /wp-admin3.57 ▲0.2648.39 ▲2.09
Posts /wp-admin/edit.php3.68 ▲0.3351.18 ▲1.17
Add New Post /wp-admin/post-new.php6.15 ▲0.2691.75 ▼7.45
Media Library /wp-admin/upload.php3.49 ▲0.2641.54 ▲10.02
Menu Cart Setup /wp-admin/options-general.php?page=wpmenucart_options_page3.4734.60

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 139 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
wpmenucart
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Menu Cart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7214.34 ▼0.001.78 ▲0.1639.26 ▲0.41
Dashboard /wp-admin2,207 ▲265.59 ▲0.0092.05 ▼11.7740.20 ▼4.93
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0739.86 ▲3.2137.80 ▲2.76
Add New Post /wp-admin/post-new.php6,377 ▲4,85127.39 ▲4.35807.96 ▲134.4057.07 ▲6.60
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0898.81 ▼3.2940.77 ▼4.24
Menu Cart Setup /wp-admin/options-general.php?page=wpmenucart_options_page1,3691.8426.4344.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • wpmenucart
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: woocommerce, shopping cart, header, edd, bar...

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

The principal PHP file in "WP Menu Cart" v. 2.14.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.4" instead of "3.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 264 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected8,620 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PO File231,4491,6213,949
SVG2002,707
PHP72613061,436
JavaScript133332250
CSS17218243
Markdown113035

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity31.71
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods34.05%
▷ Public methods7398.65%
▷ Protected methods00.00%
▷ Private methods11.35%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
28 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cart-icon-6.png0.58KB0.48KB▼ 17.25%
images/cart-icon-13.png0.65KB0.49KB▼ 24.17%
images/cart-icon-9.png0.81KB0.55KB▼ 32.69%
images/cart-icon-4.png0.90KB0.68KB▼ 24.70%
assets/images/cart-icon-5.png0.78KB0.59KB▼ 23.71%