88% fmenu

Code Review | FMenu - FOSS of Five

WordPress plugin FMenu - FOSS of Five scored 88% from 54 tests.

About plugin

  • Plugin page: fmenu
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 6, 2014
  • Latest release: Jun 1, 2016
  • Number of updates: 7
  • Update frequency: every 103.7 days
  • Top authors: daofresh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 506 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼137.88ms] Passed 4 tests

Server-side resources used by FMenu - FOSS of Five
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1435.84 ▲14.72
Dashboard /wp-admin3.11 ▲0.0551.30 ▲13.25
Posts /wp-admin/edit.php3.16 ▲0.0539.95 ▼6.32
Add New Post /wp-admin/post-new.php5.46 ▲0.0391.38 ▼565.46
Media Library /wp-admin/upload.php3.05 ▲0.0540.35 ▲7.01
FMenu Settings /wp-admin/options-general.php?page=fmenu-settings3.0029.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by FMenu - FOSS of Five
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲25316.58 ▲0.9913.74 ▲4.9249.61 ▲4.05
Dashboard /wp-admin2,999 ▲666.54 ▲0.57151.30 ▼31.26116.42 ▲5.27
Posts /wp-admin/edit.php2,774 ▲353.02 ▲0.3167.93 ▼5.6191.94 ▲0.82
Add New Post /wp-admin/post-new.php1,639 ▲13921.59 ▲3.01338.79 ▼35.25121.88 ▲17.11
Media Library /wp-admin/upload.php1,839 ▲325.44 ▲0.42138.16 ▼7.61123.03 ▲6.63
FMenu Settings /wp-admin/options-general.php?page=fmenu-settings1,9183.2998.0982.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fmenu-settings
    • > Notice in wp-content/plugins/fmenu/includes/admin.php+212
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fmenu/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fmenu/fmenu.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fmenu/includes/admin.php:258

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 on the user side

Optimizations

Plugin configuration 97% 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:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

fmenu/fmenu.php Passed 13 tests

"FMenu - FOSS of Five" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
Create a custom menu for your wordpress site in a simple way.

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
Good job! No executable or dangerous file extensions detected437 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36765281
CSS12310142
JavaScript21414

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin