77% mobile-bottom-menu-for-wp

Code Review | WP Mobile Bottom Menu

WordPress plugin WP Mobile Bottom Menu scored77%from 54 tests.

About plugin

  • Plugin page: mobile-bottom-men...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2023
  • Latest release: Nov 11, 2023
  • Number of updates: 21
  • Update frequency: every 11.7 days
  • Top authors: boomdevs (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /11,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.85MB] [CPU: ▲12.70ms] Passed 4 tests

An overview of server-side resources used by WP Mobile Bottom Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.32 ▲1.8556.86 ▲15.09
Dashboard /wp-admin5.15 ▲1.8571.74 ▲23.66
Posts /wp-admin/edit.php5.27 ▲1.9159.82 ▲13.78
Add New Post /wp-admin/post-new.php7.75 ▲1.8797.43 ▲2.52
Media Library /wp-admin/upload.php5.08 ▲1.8554.74 ▲19.41

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

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

Browser metrics Passed 4 tests

WP Mobile Bottom Menu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲24613.28 ▼0.988.93 ▲7.2342.63 ▼1.84
Dashboard /wp-admin2,267 ▲905.65 ▲0.0685.46 ▼15.0240.47 ▼3.71
Posts /wp-admin/edit.php2,169 ▲691.99 ▲0.0135.22 ▼2.9833.99 ▼3.14
Add New Post /wp-admin/post-new.php1,584 ▲5823.09 ▲0.19688.41 ▼5.3354.81 ▲0.99
Media Library /wp-admin/upload.php1,472 ▲724.25 ▼0.0297.50 ▼1.8141.98 ▲0.09
Pre-made themes /wp-admin/admin.php?page=wp-bnav-settings#tab=pre-made-themes4,2994.0170.1256.11
General settings /wp-admin/admin.php?page=wp-bnav-settings#tab=general-settings4,9574.34103.1784.92
Free Vs Pro /wp-admin/admin.php?page=wp-bnav-settings#tab=free-vs-pro4,2903.7956.32114.00
Search box /wp-admin/admin.php?page=wp-bnav-settings#tab=search-box4,2753.9955.0476.09
Menu styles /wp-admin/admin.php?page=wp-bnav-settings#tab=menu-styles17,7866.631,018.8899.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • wp-bnav
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mobile-bottom-menu-for-wp/admin/partials/wp-bnav-admin-display.php
    • > /wp-content/plugins/mobile-bottom-menu-for-wp/public/partials/wp-bnav-public-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_BNAV_PATH - assumed 'WP_BNAV_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-bottom-menu-for-wp/public/class-wp-bnav-public.php on line 2
    • > PHP Warning
      Use of undefined constant WP_BNAV_PATH - assumed 'WP_BNAV_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-bottom-menu-for-wp/includes/class-wp-bnav-render-dom.php on line 2
    • > PHP Warning
      require_once(WP_BNAV_PATHincludes/class-wp-bnav-settings.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-bottom-menu-for-wp/public/class-wp-bnav-public.php on line 2
    • > PHP Warning
      require_once(WP_BNAV_PATHincludes/class-wp-bnav-settings.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-bottom-menu-for-wp/includes/class-wp-bnav-render-dom.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_BNAV_PATHincludes/class-wp-bnav-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-bottom-menu-for-wp/public/class-wp-bnav-public.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_BNAV_PATHincludes/class-wp-bnav-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-bottom-menu-for-wp/includes/class-wp-bnav-render-dom.php on line 2

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #10, #11, #12, #13, #14, #4, #5, #6, #7, #8, #9 in mobile-bottom-menu-for-wp/assets to your readme.txt
The official readme.txt is a good inspiration

mobile-bottom-menu-for-wp/wp-bnav.php 85% from 13 tests

Analyzing the main PHP file in "WP Mobile Bottom Menu" version 1.0.8
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mobile-bottom-menu-for-wp.php" instead of "wp-bnav.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin43,666 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP1164,2433,12718,963
JavaScript71,3094996,605
PO File203,1983,5916,500
Sass1697035,674
CSS64905385,499
Markdown1700196
XML151199
JSON30096
YAML16032
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity23.94
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity5.48
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes82
▷ Abstract classes22.44%
▷ Concrete classes8097.56%
▷ Final classes00.00%
Methods421
▷ Static methods6515.44%
▷ Public methods37589.07%
▷ Protected methods81.90%
▷ Private methods389.03%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.59MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/preview_layout_skin_nine.png60.31KB34.56KB▼ 42.69%
admin/img/Jessica.png17.55KB7.51KB▼ 57.20%
admin/img/money-back-logo.png6.89KB4.25KB▼ 38.34%
admin/img/layout_preview_light_skin_one.png46.31KB21.14KB▼ 54.34%
admin/img/John.png16.63KB6.67KB▼ 59.91%