94% codeflavors-floating-menu

Code Review | CodeFlavors floating menu

WordPress plugin CodeFlavors floating menu scored 94% from 53 tests.

About plugin

  • Plugin page: codeflavors-float...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7
  • WordPress version: 5.8.1
  • First release: Aug 29, 2012
  • Latest release: Dec 9, 2016
  • Number of updates: 30
  • Update frequency: every 52.1 days
  • Top authors: constantin.boiangiu (100%)

Code review

53 tests

User reviews

13 reviews

Install metrics

900+ active / 33,565 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼256.33ms] Passed 4 tests

Analyzing server-side resources used by CodeFlavors floating menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1633.86 ▲13.01
Dashboard /wp-admin3.11 ▲0.0544.03 ▲6.28
Posts /wp-admin/edit.php3.16 ▲0.0543.22 ▲2.59
Add New Post /wp-admin/post-new.php5.47 ▲0.0486.59 ▼1,026.67
Media Library /wp-admin/upload.php3.05 ▲0.0429.45 ▼7.50
CodeFlavors Menu /wp-admin/themes.php?page=cfm_menu_options3.0227.92

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CodeFlavors floating menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7216.16 ▲0.2310.14 ▼0.0748.46 ▲3.03
Dashboard /wp-admin2,932 ▲825.94 ▼0.08139.18 ▲3.77100.65 ▼4.04
Posts /wp-admin/edit.php2,711 ▲52.69 ▼0.0064.11 ▼7.8094.56 ▲6.99
Add New Post /wp-admin/post-new.php1,484 ▼16718.54 ▲1.43395.86 ▲13.39117.49 ▲7.12
Media Library /wp-admin/upload.php1,721 ▼485.00 ▼0.04141.10 ▼8.05116.90 ▲4.63
CodeFlavors Menu /wp-admin/themes.php?page=cfm_menu_options1,1182.0960.4866.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codeflavors-floating-menu/floating_menu.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: animation, wordpress menu, menu, floating menu, drop down menu

codeflavors-floating-menu/floating_menu.php 92% from 13 tests

"CodeFlavors floating menu" version 1.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("codeflavors-floating-menu.php" instead of "floating_menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected552 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP143110275
CSS2863115
PO File23434110
JavaScript113952

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dots-arrow-left.png0.16KB0.11KB▼ 31.93%
images/open-menu-ico.png1.75KB1.32KB▼ 24.68%
images/dots-arrow-right.png0.12KB0.11KB▼ 10.48%