94% scheduled-stickiness

Code Review | Scheduled stickiness

WordPress plugin Scheduled stickiness scored 94% from 53 tests.

About plugin

  • Plugin page: scheduled-stickiness
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.0.1
  • WordPress version: 5.8.1
  • First release: Jun 6, 2015
  • Latest release: Dec 14, 2018
  • Number of updates: 7
  • Update frequency: every 183.9 days
  • Top authors: magnus_kson (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 981 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼282.84ms] Passed 4 tests

Analyzing server-side resources used by Scheduled stickiness
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1435.72 ▲16.11
Dashboard /wp-admin3.08 ▲0.0343.71 ▼1.60
Posts /wp-admin/edit.php3.13 ▲0.0342.03 ▼1.03
Add New Post /wp-admin/post-new.php5.44 ▲0.0290.35 ▼1,121.88
Media Library /wp-admin/upload.php3.02 ▲0.0231.82 ▼6.83

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Scheduled stickiness
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6815.89 ▼0.008.17 ▼0.3046.15 ▼2.10
Dashboard /wp-admin2,931 ▲815.93 ▼0.05133.58 ▼5.18109.01 ▼1.14
Posts /wp-admin/edit.php2,706 ▼02.69 ▲0.0162.49 ▼5.3591.05 ▼7.30
Add New Post /wp-admin/post-new.php1,711 ▼32718.80 ▼0.69348.94 ▼20.55108.17 ▲0.69
Media Library /wp-admin/upload.php1,772 ▼35.03 ▲0.04148.29 ▼24.71108.65 ▼5.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/scheduled-stickiness/scheduled-stickiness.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
1 plugin tags: scheduled stickiness set sticky unsticky automatic

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

Analyzing the main PHP file in "Scheduled stickiness" version 0.1
82 characters long description:
A plugin that sets and unsets stickiness for individual posts based on meta fields

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14242120

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
scheduled-stickiness-1.png171.32KB54.32KB▼ 68.30%