78% toast-stick-anything

Code Review | Sticky Anything

WordPress plugin Sticky Anything scored78%from 54 tests.

About plugin

  • Plugin page: toast-stick-anything
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.6
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: Dec 18, 2020
  • Number of updates: 40
  • Update frequency: every 19.8 days
  • Top authors: toastwebsites (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /14,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.21MB] [CPU: ▼16.28ms] Passed 4 tests

This is a short check of server-side resources used by Sticky Anything
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.46 ▼2.65
Dashboard /wp-admin3.08 ▼0.2228.04 ▼22.53
Posts /wp-admin/edit.php3.22 ▼0.1331.76 ▼14.65
Add New Post /wp-admin/post-new.php5.46 ▼0.4271.14 ▼19.74
Media Library /wp-admin/upload.php3.15 ▼0.0730.23 ▼8.21
Sticky Anything /wp-admin/options-general.php?page=toast_sticky_anything3.2030.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sticky Anything
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.25 ▼1.132.04 ▲0.2640.03 ▼6.92
Dashboard /wp-admin2,207 ▲255.81 ▲0.9397.18 ▼13.9440.74 ▼1.20
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0140.42 ▲4.2235.40 ▼1.55
Add New Post /wp-admin/post-new.php1,545 ▲1718.03 ▼5.19669.14 ▼31.2663.56 ▲9.34
Media Library /wp-admin/upload.php1,389 ▼24.21 ▲0.06108.37 ▲0.5147.10 ▼2.29
Sticky Anything /wp-admin/options-general.php?page=toast_sticky_anything9962.0425.5538.72

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=toast_sticky_anything
    • > Notice in wp-content/plugins/toast-stick-anything/backend/backend.php+52
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=toast_sticky_anything
    • > Warning in wp-content/plugins/toast-stick-anything/backend/backend.php+79
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-stick-anything/backend/backend.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-stick-anything/frontend/frontend-script.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-stick-anything/frontend/frontend-script.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-stick-anything/backend/functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: Please take inspiration from this readme.txt

toast-stick-anything/toaststickyitems.php 92% from 13 tests

The main PHP file in "Sticky Anything" ver. 2.1.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("toast-stick-anything.php" instead of "toaststickyitems.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected260 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42611170
JavaScript113263
CSS12027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions5
▷ Named functions5100.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
No PNG files were detected