84% sticky-notice

Code Review | Sticky Notice

WordPress plugin Sticky Notice scored84%from 54 tests.

About plugin

  • Plugin page: sticky-notice
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 14, 2013
  • Latest release: Aug 17, 2013
  • Number of updates: 18
  • Update frequency: every 0.7 days
  • Top authors: b0812015 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,187 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.03MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by Sticky Notice
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.45 ▼6.76
Dashboard /wp-admin3.34 ▲0.0343.08 ▼9.58
Posts /wp-admin/edit.php3.39 ▲0.0346.39 ▲1.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.71 ▼10.63
Media Library /wp-admin/upload.php3.26 ▲0.0338.17 ▲7.21

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 10 new options
New WordPress options
trs_sticky_notice_position
can_compress_scripts
trs_sticky_notice_text
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
trs_sticky_notice_theme
trs_sticky_notice_font_size
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sticky Notice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.53 ▼0.041.73 ▼0.0047.24 ▼1.41
Dashboard /wp-admin2,214 ▲375.58 ▲0.0484.96 ▼12.1040.88 ▼2.25
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0141.76 ▲5.3834.88 ▼0.99
Add New Post /wp-admin/post-new.php1,539 ▲1323.62 ▲0.45688.82 ▲73.0355.29 ▼3.19
Media Library /wp-admin/upload.php1,416 ▲194.13 ▼0.12111.80 ▲10.7650.19 ▲4.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • theysaidso_admin_options
    • widget_recent-posts
    • trs_sticky_notice_theme
    • widget_recent-comments
    • trs_sticky_notice_font_size
    • trs_sticky_notice_text
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • trs_sticky_notice_position

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sticky-notice/sticky_notice.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

sticky-notice/sticky_notice.php 92% from 13 tests

The principal PHP file in "Sticky Notice" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sticky-notice.php" instead of "sticky_notice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin173 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11531173

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity5.00
▷ Minimum method complexity5.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
red.png2.74KB0.09KB▼ 96.57%
orange.png2.73KB0.09KB▼ 96.60%
green.png2.73KB0.09KB▼ 96.60%
blue.png2.74KB0.09KB▼ 96.57%