83% tp-flatsome-vertical-menu

Code Review | TP Flatsome Vertical Menu

WordPress plugin TP Flatsome Vertical Menu scored83%from 54 tests.

About plugin

  • Plugin page: tp-flatsome-verti...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: Sep 28, 2021
  • Number of updates: 34
  • Update frequency: every 2.0 days
  • Top authors: pdutie94 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /2,237 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.57ms] Passed 4 tests

Server-side resources used by TP Flatsome Vertical Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.16 ▲1.11
Dashboard /wp-admin3.31 ▼0.0449.42 ▼16.57
Posts /wp-admin/edit.php3.36 ▲0.0055.01 ▲3.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.16 ▼12.68
Media Library /wp-admin/upload.php3.23 ▲0.0037.20 ▼2.14

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/tp-flatsome-vertical-menu/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

TP Flatsome Vertical Menu: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.19 ▼1.121.76 ▲0.0543.11 ▼1.38
Dashboard /wp-admin2,224 ▲174.88 ▼0.07111.08 ▼0.4141.34 ▼1.92
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0139.45 ▲5.5236.94 ▲3.22
Add New Post /wp-admin/post-new.php1,423 ▼12517.99 ▼5.25574.21 ▼84.2844.26 ▼16.49
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.0397.94 ▼8.7945.19 ▼0.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/tp-flatsome-vertical-menu/inc/class-tp-vertical-menu-dropdown.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/tp-flatsome-vertical-menu/inc/tp-vertical-menu-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tp-flatsome-vertical-menu/main.php:21

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

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "paypal.me/pdutie94"
  • Screenshots: These screenshots lack descriptions #1, #2, #4, #5 in tp-flatsome-vertical-menu/assets to your readme.txt
The official readme.txt is a good inspiration

tp-flatsome-vertical-menu/main.php 85% from 13 tests

The entry point to "TP Flatsome Vertical Menu" version 1.1.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tp-flatsome-vertical-menu.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin810 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP697237577
JavaScript61811134
CSS13099

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.00
▷ Minimum class complexity7.00
▷ Maximum class complexity61.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin