78% ot-flatsome-vertical-menu

Code Review | OT Flatsome Vertical Menu

WordPress plugin OT Flatsome Vertical Menu scored78%from 54 tests.

About plugin

  • Plugin page: ot-flatsome-verti...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2017
  • Latest release: Jun 17, 2020
  • Number of updates: 19
  • Update frequency: every 56.7 days
  • Top authors: thinhbg59 (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

10,000+ active /68,279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.34MB] [CPU: ▼4.35ms] Passed 4 tests

This is a short check of server-side resources used by OT Flatsome Vertical Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.55 ▲2.0951.15 ▲12.39
Dashboard /wp-admin5.35 ▲2.0560.88 ▲11.30
Posts /wp-admin/edit.php5.39 ▲2.0358.34 ▲11.79
Add New Post /wp-admin/post-new.php5.18 ▼0.7147.00 ▼52.89
Media Library /wp-admin/upload.php5.20 ▲1.9746.89 ▲12.45
OT FS Vertical Menu /wp-admin/options-general.php?page=ot-flatsome-vertical-menu5.1839.65

Server storage [IO: ▲7.27MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 187 new files
Database: no new tables, 7 new options
New WordPress options
menu_icons_install
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for OT Flatsome Vertical Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲29713.61 ▼0.769.83 ▲8.1028.70 ▼14.65
Dashboard /wp-admin2,332 ▲1415.82 ▲0.8195.24 ▼8.6043.45 ▼5.04
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0238.45 ▲0.5835.04 ▲3.24
Add New Post /wp-admin/post-new.php1,536 ▲1723.18 ▲0.03640.51 ▼37.2252.25 ▼5.18
Media Library /wp-admin/upload.php1,392 ▲74.19 ▲0.0195.17 ▼16.2241.10 ▼4.67
OT FS Vertical Menu /wp-admin/options-general.php?page=ot-flatsome-vertical-menu8652.0624.2430.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • menu_icons_install
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/includes/media-template.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/icon-picker/icon-picker.php:340
    • > PHP Fatal error
      Uncaught Error: Class 'Icon_Picker_Type_Font' not found in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/icon-picker/includes/types/genericon.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ot-flatsome-vertical-menu/ot-flatsome-vertical-menu.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/menu-icons.php:157
    • > PHP Fatal error
      Uncaught Error: Class 'CMB_Field' not found in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/icon-picker/includes/fields/cmb.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/menu-item-custom-fields/doc/menu-item-custom-fields-example.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Icon_Picker_Type_Font' not found in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/vendor/codeinwp/icon-picker/includes/types/foundation-icons.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ot-flatsome-vertical-menu/libs/menu-icons/includes/media-template.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ot-flatsome-vertical-menu/includes/functions.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: flatsome, vertical menu

ot-flatsome-vertical-menu/ot-flatsome-vertical-menu.php Passed 13 tests

The main file in "OT Flatsome Vertical Menu" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Vertical Menu for Flatsome theme by thinhbg59@gmail.com

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected36,837 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP601,6574,44915,516
SVG701813,780
CSS1982554,343
JavaScript375457022,153
Markdown72840527
LESS1491325
JSON100164
XML24229

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.56
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes54
▷ Abstract classes59.26%
▷ Concrete classes4990.74%
▷ Final classes1020.41%
Methods429
▷ Static methods8620.05%
▷ Public methods34480.19%
▷ Protected methods409.32%
▷ Private methods4510.49%
Functions22
▷ Named functions1568.18%
▷ Anonymous functions731.82%
Constants25
▷ Global constants520.00%
▷ Class constants2080.00%
▷ Public constants20100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 1.17MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/menu-icons/assets/screenshot-6.png101.46KB37.94KB▼ 62.61%
libs/menu-icons/assets/screenshot-2.png61.18KB26.20KB▼ 57.18%
libs/menu-icons/assets/screenshot-5.png104.34KB38.53KB▼ 63.08%
libs/menu-icons/assets/screenshot-1.png31.18KB13.81KB▼ 55.70%
libs/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-1.png557.00KB123.01KB▼ 77.92%