10% sm-sticky-featured-widget

Code Review | SM Sticky Featured Widget

WordPress plugin SM Sticky Featured Widget scored10%from 54 tests.

About plugin

  • Plugin page: sm-sticky-feature...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.2.3
  • WordPress version: 6.3.1
  • First release: May 18, 2010
  • Latest release: Jul 28, 2015
  • Number of updates: 32
  • Update frequency: every 59.3 days
  • Top authors: sethmatics (78.13%)sethcarstens (25%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /17,230 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/sm-sticky-featured-widget/sticky-featured-widget.php+12
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.72ms] Passed 4 tests

Server-side resources used by SM Sticky Featured Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.80 ▼36.15
Dashboard /wp-admin2.05 ▼1.266.77 ▼45.49
Posts /wp-admin/edit.php2.05 ▼1.316.15 ▼39.40
Add New Post /wp-admin/post-new.php2.05 ▼3.846.20 ▼89.83
Media Library /wp-admin/upload.php2.05 ▼1.185.67 ▼26.53

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_wp_widget_smsticky
widget_theysaidso_widget

Browser metrics Passed 4 tests

SM Sticky Featured Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.151.77 ▲0.1638.37 ▼4.83
Dashboard /wp-admin2,206 ▲244.86 ▼0.99108.66 ▲5.0243.77 ▲3.56
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0540.84 ▼2.7733.93 ▼3.70
Add New Post /wp-admin/post-new.php1,533 ▲1923.20 ▼0.22627.23 ▼27.5754.28 ▲4.66
Media Library /wp-admin/upload.php1,382 ▼94.22 ▲0.0195.01 ▼6.4040.65 ▼5.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/sm-sticky-featured-widget/sticky-featured-widget.php+12
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wp_widget_smsticky

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)
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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-sticky-featured-widget/sticky-featured-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (A sample of the widget when used on premium theme like ClassiPress.), #2 (A sample of the widget on the default Wordpress theme, TwentyTen.)
The official readme.txt is a good inspiration

sm-sticky-featured-widget/sticky-featured-widget.php 92% from 13 tests

The principal PHP file in "SM Sticky Featured Widget" v. 1.2.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sm-sticky-featured-widget.php" instead of "sticky-featured-widget.php")

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
Good job! No executable or dangerous file extensions detected136 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12835136

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity11.00
▷ Minimum method complexity1.00
▷ Maximum method complexity39.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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.75KB14.82KB▼ 59.69%
screenshot-2.png17.30KB7.61KB▼ 56.01%