84% sticky

Code Review | Sticky

WordPress plugin Sticky scored84%from 54 tests.

About plugin

  • Plugin page: sticky
  • Plugin version: 2.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Apr 29, 2016
  • Latest release: Jan 26, 2022
  • Number of updates: 17
  • Update frequency: every 123.5 days
  • Top authors: cvmh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,226 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼10.44ms] Passed 4 tests

Analyzing server-side resources used by Sticky
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.95 ▲0.78
Dashboard /wp-admin3.37 ▲0.0749.57 ▼4.04
Posts /wp-admin/edit.php3.26 ▼0.0934.03 ▼13.98
Add New Post /wp-admin/post-new.php5.50 ▼0.3864.10 ▼23.87
Media Library /wp-admin/upload.php3.30 ▲0.0735.00 ▲0.14
Sticky /wp-admin/options-general.php?page=cvmh-sticky3.2743.64

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_cvmh_sticky_widget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sticky
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.17 ▼0.061.98 ▲0.2544.41 ▲0.47
Dashboard /wp-admin2,203 ▲265.63 ▼0.0594.08 ▼4.6541.01 ▼1.20
Posts /wp-admin/edit.php2,105 ▲52.02 ▲0.0236.05 ▲2.1433.47 ▼2.20
Add New Post /wp-admin/post-new.php1,533 ▲723.23 ▲0.20637.67 ▼50.8953.50 ▲1.00
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.03101.10 ▼13.0444.51 ▼3.28
Sticky /wp-admin/options-general.php?page=cvmh-sticky8191.7727.0924.57

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_cvmh_sticky_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=cvmh-sticky
    • > Notice in wp-content/plugins/sticky/includes/settings.php+9
    Undefined index: action
    • > GET request to /wp-admin/options-general.php?page=cvmh-sticky
    • > Notice in wp-content/plugins/sticky/includes/settings.php+58
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=cvmh-sticky
    • > Warning in wp-content/plugins/sticky/includes/settings.php+58
    in_array() expects parameter 2 to be array, null given

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: sticky, pages, widget

sticky/sticky.php Passed 13 tests

This is the main PHP file of "Sticky" version 2.5.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
50 characters long description:
Adds sticky support for pages and/or custom posts.

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
Good job! No executable or dangerous file extensions detected699 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP89174458
PO File14495107
CSS217389
JavaScript212745

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 are no PNG files in this plugin