78% catch-sticky-menu

Code Review | Catch Sticky Menu

WordPress plugin Catch Sticky Menu scored78%from 54 tests.

About plugin

  • Plugin page: catch-sticky-menu
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2018
  • Latest release: Nov 15, 2023
  • Number of updates: 17
  • Update frequency: every 107.3 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /30,816 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.59ms] Passed 4 tests

Server-side resources used by Catch Sticky Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1740.41 ▲0.32
Dashboard /wp-admin3.47 ▲0.1247.26 ▼10.77
Posts /wp-admin/edit.php3.58 ▲0.2251.17 ▼1.19
Add New Post /wp-admin/post-new.php6.05 ▲0.1698.43 ▲7.59
Media Library /wp-admin/upload.php3.39 ▲0.1632.69 ▲1.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Catch Sticky Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15513.39 ▼0.8910.27 ▲8.5245.55 ▲0.12
Dashboard /wp-admin2,202 ▲255.60 ▼0.0196.00 ▼1.2045.44 ▲0.13
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.1442.04 ▲0.0236.75 ▼2.85
Add New Post /wp-admin/post-new.php1,539 ▲423.63 ▼1.48619.73 ▼8.0558.19 ▼7.87
Media Library /wp-admin/upload.php1,419 ▲284.20 ▲0.0497.92 ▼5.8343.36 ▲0.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/catch-sticky-menu/public/partials/catch-sticky-menu-public-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/catch-sticky-menu/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-sticky-menu/admin/partials/catch-sticky-menu-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-sticky-menu/admin/partials/dashboard-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-sticky-menu/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/catch-sticky-menu/includes/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-sticky-menu/includes/ctp-tabs-removal.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: navigation, sticky-menu, fixed, sticky

catch-sticky-menu/catch-sticky-menu.php 92% from 13 tests

The principal PHP file in "Catch Sticky Menu" v. 1.7.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,848 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP172516541,001
CSS213930682
JavaScript54334165

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%