79% sv-sticky-menu

Code Review | SV Sticky Menu

WordPress plugin SV Sticky Menu scored79%from 54 tests.

About plugin

  • Plugin page: sv-sticky-menu
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Sep 11, 2017
  • Number of updates: 12
  • Update frequency: every 6.8 days
  • Top authors: andreysv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.96ms] Passed 4 tests

A check of server-side resources used by SV Sticky Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.95 ▲1.26
Dashboard /wp-admin3.42 ▲0.1154.03 ▲1.18
Posts /wp-admin/edit.php3.53 ▲0.1857.80 ▲7.42
Add New Post /wp-admin/post-new.php5.99 ▲0.1189.82 ▼8.82
Media Library /wp-admin/upload.php3.32 ▲0.0941.92 ▲2.53
SV Sticky Menu /wp-admin/options-general.php?page=sv-sticky-menu-page3.2935.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
sv-sticky-menu-page-options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by SV Sticky Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲20014.68 ▲0.342.24 ▲0.2038.29 ▼5.99
Dashboard /wp-admin2,359 ▲1826.40 ▲0.72118.83 ▲28.2441.55 ▲0.97
Posts /wp-admin/edit.php2,287 ▲1873.54 ▲1.5254.68 ▲18.0634.75 ▼1.93
Add New Post /wp-admin/post-new.php1,547 ▲2023.24 ▲0.18648.40 ▼67.2637.52 ▼27.35
Media Library /wp-admin/upload.php1,424 ▲274.25 ▲0.0796.30 ▼8.3946.14 ▼0.02
SV Sticky Menu /wp-admin/options-general.php?page=sv-sticky-menu-page1,6263.9865.3829.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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 server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=sv-sticky-menu-page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sv-sticky-menu-page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sv-sticky-menu-page
    • > Notice in wp-content/plugins/sv-sticky-menu/sv-sticky-menu.php+354
    Undefined property: CSvStickyMenu::$plugin_name

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sv-sticky-menu/sv-sticky-menu.php

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
5 plugin tags: transiton, sticky, fixed, menu, top

sv-sticky-menu/sv-sticky-menu.php Passed 13 tests

The main PHP script in "SV Sticky Menu" version 1.0.5 is automatically included on every request by WordPress
100 characters long description:
SV Sticky Menu is WordPress's plugin that transform menu to sticky menu on top of page by scrolling.

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
Everything looks great! No dangerous files found in this plugin580 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26544422
CSS15015292
JavaScript3172466

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin