78% woo-mobile-bottom-bar

Code Review | WooCommerce Bottom Bar for Mobile

WordPress plugin WooCommerce Bottom Bar for Mobile scored78%from 54 tests.

About plugin

  • Plugin page: woo-mobile-bottom...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2018
  • Latest release: Feb 15, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: maartenbelmans (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /8,243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.33ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Bottom Bar for Mobile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.73 ▼2.32
Dashboard /wp-admin3.41 ▲0.1145.12 ▼9.69
Posts /wp-admin/edit.php3.53 ▲0.1748.68 ▼0.25
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.23 ▼13.96
Media Library /wp-admin/upload.php3.34 ▲0.1034.51 ▼3.36
WooCommerce Bottom Bar /wp-admin/options-general.php?page=woo-mobile-bottom-bar3.3634.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Bottom Bar for Mobile
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲13613.52 ▼1.107.47 ▲5.7748.29 ▲8.14
Dashboard /wp-admin2,207 ▲195.79 ▼0.0697.62 ▼0.0936.69 ▼8.47
Posts /wp-admin/edit.php2,093 ▲11.98 ▼0.0341.76 ▲1.4735.28 ▼2.79
Add New Post /wp-admin/post-new.php1,517 ▼117.38 ▼5.69676.54 ▲2.8362.42 ▲3.88
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0297.66 ▼5.0141.06 ▼5.35
WooCommerce Bottom Bar /wp-admin/options-general.php?page=woo-mobile-bottom-bar1,0812.6061.4827.09

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/container-option.php
    • > /wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/colorpicker.php
    • > /wp-content/plugins/woo-mobile-bottom-bar/core/views/widget_form.php
  • 85× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_WCBB\\Core\\Models\\Option' not found in wp-content/plugins/woo-mobile-bottom-bar/core/models/class-pro-option.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_WCBB\\Core\\Models\\Option' not found in wp-content/plugins/woo-mobile-bottom-bar/core/models/class-datepicker-option.php:6
    • > PHP Notice
      Trying to get property 'button_text' of non-object in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/container-option.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_extra_data_attributes() on null in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/datepicker.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_WCBB\\Core\\Models\\Option' not found in wp-content/plugins/woo-mobile-bottom-bar/core/models/class-checkbox-option.php:6
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/hidden.php on line 5
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/datepicker.php on line 11
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/hidden.php on line 5
    • > PHP Notice
      Undefined variable: model in wp-content/plugins/woo-mobile-bottom-bar/code/views/bar.php on line 21
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/woo-mobile-bottom-bar/core/views/fields/colorpicker.php on line 7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: cart, bar, storefront, bottom, woocommerce

woo-mobile-bottom-bar/mabel-wc-bottom-bar.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Bottom Bar for Mobile" version 1.0.0
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-mobile-bottom-bar.php" instead of "mabel-wc-bottom-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,819 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP614533041,719
SVG20082
JavaScript24016
CSS2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.58
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes00.00%
Methods98
▷ Static methods1414.29%
▷ Public methods9293.88%
▷ Protected methods00.00%
▷ Private methods66.12%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.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 are no PNG files in this plugin