83% sticky-menu-block

Code Review | Sticky Content - Stick any content on pages

WordPress plugin Sticky Content - Stick any content on pages scored83%from 54 tests.

About plugin

  • Plugin page: sticky-menu-block
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 16
  • Update frequency: every 33.2 days
  • Top authors: charlescormier (68.75%)abuhayat (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,682 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Sticky Content - Stick any content on pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0347.09 ▲5.46
Dashboard /wp-admin3.32 ▼0.0350.37 ▼13.73
Posts /wp-admin/edit.php3.37 ▲0.0150.87 ▲2.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.16 ▼11.27
Media Library /wp-admin/upload.php3.24 ▲0.0139.06 ▲0.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sticky Content - Stick any content on pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲16214.07 ▼0.2511.45 ▲9.3946.10 ▲2.57
Dashboard /wp-admin2,203 ▲155.83 ▼0.07107.41 ▲0.7740.27 ▼0.68
Posts /wp-admin/edit.php2,089 ▲31.98 ▼0.0237.91 ▼0.1735.09 ▼0.17
Add New Post /wp-admin/post-new.php6,358 ▲4,84427.93 ▲10.36934.80 ▲253.9841.52 ▼19.52
Media Library /wp-admin/upload.php1,385 ▼34.11 ▼0.07109.15 ▲0.7747.41 ▼2.06

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SMB_PLUGIN_VERSION - assumed 'SMB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sticky-menu-block/dist/script.asset.php on line 4
    • > PHP Warning
      Use of undefined constant SMB_PLUGIN_VERSION - assumed 'SMB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sticky-menu-block/dist/editor.asset.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

sticky-menu-block/index.php 85% from 13 tests

The main PHP script in "Sticky Content - Stick any content on pages" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sticky-menu-block.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin151 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON20063
PO File1152843
PHP3111340
CSS3063
JavaScript3162

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected