73% mobile-menu

Code Review | WP Mobile Menu - The Mobile-Friendly Responsive Menu

WordPress plugin WP Mobile Menu - The Mobile-Friendly Responsive Menu scored73%from 54 tests.

About plugin

  • Plugin page: mobile-menu
  • Plugin version: 2.8.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Jul 5, 2023
  • Number of updates: 189
  • Update frequency: every 18.2 days
  • Top authors: takanakui (100%)

Code review

54 tests

User reviews

248 reviews

Install metrics

100,000+ active /1,672,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.68MB] [CPU: ▲4.13ms] Passed 4 tests

A check of server-side resources used by WP Mobile Menu - The Mobile-Friendly Responsive Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.32 ▲2.8655.27 ▲17.13
Dashboard /wp-admin4.00 ▲0.7049.02 ▲2.27
Posts /wp-admin/edit.php4.05 ▲0.7048.08 ▲3.66
Add New Post /wp-admin/post-new.php6.52 ▲0.6397.16 ▲0.14
Media Library /wp-admin/upload.php3.93 ▲0.7042.54 ▲10.45
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.2737.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 282 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
fs_debug_mode
fs_active_plugins
fs_accounts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

WP Mobile Menu - The Mobile-Friendly Responsive Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲22813.66 ▼1.087.90 ▲6.1855.94 ▲18.04
Dashboard /wp-admin2,243 ▲584.87 ▼0.9895.95 ▼3.9544.28 ▲0.43
Posts /wp-admin/edit.php2,123 ▲341.98 ▼0.0135.34 ▼1.9432.41 ▼1.70
Add New Post /wp-admin/post-new.php1,532 ▲1817.57 ▲0.04680.84 ▼14.9053.98 ▼0.35
Media Library /wp-admin/upload.php1,416 ▲284.21 ▲0.0498.86 ▼3.3744.37 ▼0.87
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0941.7222.3025.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/mobile-menu/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_accounts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'MobileMenuOptions' not found in wp-content/plugins/mobile-menu/includes/dynamic-style.php:12

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 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

mobile-menu/mobmenu.php 92% from 13 tests

The principal PHP file in "WP Mobile Menu - The Mobile-Friendly Responsive Menu" v. 2.8.4 is loaded by WordPress automatically on each request
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-menu.php" instead of "mobmenu.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected52,834 lines of code in 213 files:
LanguageFilesBlank linesComment linesLines of code
PHP1689,20319,30944,973
JavaScript166226633,809
CSS231561202,420
PO File14586291,023
Markdown21380556
JSON10028
SVG20025

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity61.48
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes98
▷ Abstract classes22.04%
▷ Concrete classes9697.96%
▷ Final classes00.00%
Methods1,700
▷ Static methods21212.47%
▷ Public methods1,11465.53%
▷ Protected methods19811.65%
▷ Private methods38822.82%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants152
▷ Global constants10166.45%
▷ Class constants5133.55%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.47MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png6.58KB3.48KB▼ 47.18%
includes/demo-content/assets/freedemo-mobile-menu.png50.94KB15.75KB▼ 69.08%
includes/demo-content/assets/prodemo-mobile-menu.png147.69KB42.46KB▼ 71.25%
includes/assets/right-menu-icon.png0.39KB0.27KB▼ 31.17%
includes/assets/left-menu-icon.png0.40KB0.27KB▼ 32.84%