84% sticky-element

Code Review | Sticky Element

WordPress plugin Sticky Element scored84%from 54 tests.

About plugin

  • Plugin page: sticky-element
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Jan 26, 2019
  • Number of updates: 36
  • Update frequency: every 61.9 days
  • Top authors: Youdaman (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active /15,416 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.79ms] Passed 4 tests

An overview of server-side resources used by Sticky Element
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.24 ▼0.06
Dashboard /wp-admin3.33 ▲0.0244.00 ▼2.64
Posts /wp-admin/edit.php3.38 ▲0.0245.04 ▼4.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.86 ▼15.92
Media Library /wp-admin/upload.php3.25 ▲0.0236.67 ▲0.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Sticky Element
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.79 ▼0.426.08 ▲4.3644.14 ▲4.35
Dashboard /wp-admin2,221 ▲305.79 ▼0.06102.43 ▼0.9264.43 ▲20.39
Posts /wp-admin/edit.php2,107 ▲151.97 ▼0.0438.71 ▼2.2734.09 ▼2.29
Add New Post /wp-admin/post-new.php1,545 ▲318.19 ▼0.18664.97 ▲55.6485.28 ▲27.90
Media Library /wp-admin/upload.php1,394 ▲64.15 ▼0.06101.46 ▲3.6080.26 ▲38.19

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sticky-element/sticky-element.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: Screenshot #1 (Settings page) image missing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sticky-element === )
You can look at the official readme.txt

sticky-element/sticky-element.php Passed 13 tests

This is the main PHP file of "Sticky Element" version 1.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
34 characters long description:
Prevent element scrolling off page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin130 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1347130

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.19KB10.36KB▼ 65.68%
icon.png3.56KB0.90KB▼ 74.73%