10% friendly-menu-for-mobile

Code Review | Friendly Menu for Mobile

WordPress plugin Friendly Menu for Mobile scored10%from 54 tests.

About plugin

  • Plugin page: friendly-menu-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-5.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: May 13, 2020
  • Number of updates: 5
  • Update frequency: every 5.8 days
  • Top authors: desparza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php+9
    Use of undefined constant enable - assumed 'enable' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼51.26ms] Passed 4 tests

This is a short check of server-side resources used by Friendly Menu for Mobile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.27 ▼33.43
Dashboard /wp-admin2.06 ▼1.246.48 ▼39.74
Posts /wp-admin/edit.php2.06 ▼1.297.17 ▼41.48
Add New Post /wp-admin/post-new.php2.06 ▼3.827.14 ▼90.37
Media Library /wp-admin/upload.php2.06 ▼1.167.71 ▼27.33
Friendly Menu for Mobile /wp-admin/admin.php?page=dewp-fmm-admin-settings2.066.14
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu2.068.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Friendly Menu for Mobile
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.18 ▼1.191.63 ▼0.0940.57 ▼0.47
Dashboard /wp-admin2,231 ▲435.85 ▲0.79105.08 ▼4.3050.19 ▲7.80
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0139.39 ▼1.4437.48 ▲0.22
Add New Post /wp-admin/post-new.php1,549 ▲2923.03 ▼0.31667.46 ▼2.6046.52 ▼9.74
Media Library /wp-admin/upload.php1,410 ▲224.17 ▼0.0293.65 ▼13.4043.24 ▼3.42
Friendly Menu for Mobile /wp-admin/admin.php?page=dewp-fmm-admin-settings1,0222.0224.2230.37
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu8022.0524.6529.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php+9
    Use of undefined constant enable - assumed 'enable' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=desparza-menu
    • > Warning in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php+9
    Use of undefined constant enable - assumed 'enable' (this will throw an Error in a future version of PHP)
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=desparza-menu
    • > Notice in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php+9
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/friendly-menu-for-mobile/wp-friendly-menu-mobile.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: dewp_options in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php on line 9
    • > PHP Warning
      Use of undefined constant enable - assumed 'enable' (this will throw an Error in a future version of PHP) in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-admin.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/friendly-menu-for-mobile/includes/wp-friendly-menu-mobile-functions.php on line 9

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires php: Invalid plugin version format
Please take inspiration from this readme.txt

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

The primary PHP file in "Friendly Menu for Mobile" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 215 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("friendly-menu-for-mobile.php" instead of "wp-friendly-menu-mobile.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin251 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44535234
CSS22215
JavaScript1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected