83% mobile-menu-builder

Code Review | Mobile Menu Builder for WordPress

WordPress plugin Mobile Menu Builder for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: mobile-menu-builder
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Nov 29, 2018
  • Number of updates: 13
  • Update frequency: every 1.0 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /13,022 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.16MB] [CPU: ▼2.27ms] Passed 4 tests

Analyzing server-side resources used by Mobile Menu Builder for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.55 ▲0.63
Dashboard /wp-admin3.47 ▲0.1649.42 ▼1.96
Posts /wp-admin/edit.php3.58 ▲0.2350.32 ▼0.57
Add New Post /wp-admin/post-new.php6.05 ▲0.1692.94 ▼5.19
Media Library /wp-admin/upload.php3.39 ▲0.1638.25 ▼1.37
Mobile Menu Builder /wp-admin/index.php?page=mobile-menu-builder--welcome3.3636.40

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 374 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
mobile_menu_builder_customizer
db_upgraded
widget_theysaidso_widget
MOBILE_MENU_BUILDER_INSTALLED
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Mobile Menu Builder for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.68 ▼0.758.53 ▲6.5538.64 ▼7.83
Dashboard /wp-admin2,210 ▲285.87 ▼0.02110.65 ▲3.5044.49 ▼4.91
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0642.36 ▲4.3935.10 ▼3.58
Add New Post /wp-admin/post-new.php1,540 ▲2623.29 ▲5.78644.88 ▼116.5253.01 ▲1.95
Media Library /wp-admin/upload.php1,392 ▲104.29 ▲0.0798.62 ▼12.1243.33 ▼0.18
Mobile Menu Builder /wp-admin/index.php?page=mobile-menu-builder--welcome1,3729.14304.9472.09

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
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • MOBILE_MENU_BUILDER_INSTALLED
    • mobile_menu_builder_customizer
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-1.php on line 3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-4.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/popup-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-3.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-container.php:3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-3.php on line 3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/popup-widgets.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-link-1.php:3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/mobile-menu-builder/includes/customizer/sections/menu-templates.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (WordPress Mobile Menu with Modal Popup), #2 (On User Scroll Animation), #3 (Menu Builder Settings), #4 (Pop-up Menu Builder Settings), #5 (Changing Icons and Label)
The official readme.txt might help

mobile-menu-builder/plugin.php 77% from 13 tests

"Mobile Menu Builder for WordPress" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("mobile-menu-builder.php" instead of "plugin.php")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin6,615 lines of code in 361 files:
LanguageFilesBlank linesComment linesLines of code
SVG318032,404
PHP213244021,856
JavaScript1092621,762
Sass33026439
CSS92321154

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.15
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods40
▷ Static methods410.00%
▷ Public methods3690.00%
▷ Protected methods00.00%
▷ Private methods410.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.46MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png92.31KB35.81KB▼ 61.21%
assets/images/placeholder.png0.24KB0.25KB0.00%
screenshot-3.png248.80KB99.45KB▼ 60.03%
screenshot-4.png125.83KB48.82KB▼ 61.20%