84% scheduled-unsticky

Code Review | Scheduled Unsticky

WordPress plugin Scheduled Unsticky scored84%from 54 tests.

About plugin

  • Plugin page: scheduled-unsticky
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Sep 13, 2014
  • Number of updates: 23
  • Update frequency: every 22.9 days
  • Top authors: f.staude (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,653 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.50ms] Passed 4 tests

Analyzing server-side resources used by Scheduled Unsticky
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.52 ▼1.71
Dashboard /wp-admin3.34 ▲0.0457.78 ▲8.87
Posts /wp-admin/edit.php3.45 ▲0.1052.14 ▼3.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.47 ▼8.38
Media Library /wp-admin/upload.php3.26 ▲0.0338.70 ▼8.63

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
scheduled_unsticky_days
can_compress_scripts
scheduled_unsticky_cron
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scheduled Unsticky
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.071.87 ▼0.2441.55 ▼4.36
Dashboard /wp-admin2,195 ▲185.66 ▲0.0287.78 ▼2.2239.41 ▼4.18
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0633.71 ▼5.3038.13 ▲1.74
Add New Post /wp-admin/post-new.php1,545 ▼023.12 ▼0.16645.50 ▼15.3660.98 ▼0.43
Media Library /wp-admin/upload.php1,397 ▲34.25 ▲0.0495.10 ▼17.6441.55 ▼4.05

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/scheduled-unsticky/scheduled-unsticky.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/scheduled-unsticky/class-wp-cli-commands.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Settings dialog - english), #2 (WP_CLI output from 'wp help scheduled-unsticky')
Please take inspiration from this readme.txt

scheduled-unsticky/scheduled-unsticky.php Passed 13 tests

"Scheduled Unsticky" version 0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
56 characters long description:
Removes sticky flag after a adjustable period from posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin178 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33361112
PO File2142466

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods990.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png165.41KB60.54KB▼ 63.40%
screenshot-2.png29.83KB8.32KB▼ 72.12%