83% expire-sticky-posts

Code Review | Expire Sticky Posts

WordPress plugin Expire Sticky Posts scored83%from 54 tests.

About plugin

  • Plugin page: expire-sticky-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Dec 19, 2014
  • Latest release: Dec 20, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: avondohren (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /11,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Expire Sticky Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.32 ▼10.11
Dashboard /wp-admin3.32 ▲0.0245.17 ▼5.53
Posts /wp-admin/edit.php3.38 ▲0.0245.87 ▼1.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.44 ▼6.83
Media Library /wp-admin/upload.php3.25 ▲0.0232.18 ▼2.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Expire Sticky Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.60 ▼0.692.04 ▲0.3140.40 ▼9.65
Dashboard /wp-admin2,206 ▲185.88 ▲0.98107.65 ▼7.5442.07 ▼0.54
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0539.05 ▲3.7334.30 ▼2.45
Add New Post /wp-admin/post-new.php1,527 ▲1317.68 ▼0.03586.97 ▼54.4427.48 ▼26.79
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0295.12 ▼5.2240.58 ▼4.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/expire-sticky-posts/expire-sticky-posts.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Metabox added to each post / custom post type), #2 (Metabox with calendar showing)
The official readme.txt is a good inspiration

expire-sticky-posts/expire-sticky-posts.php 77% from 13 tests

The principal PHP file in "Expire Sticky Posts" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

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
There were no executable files found in this plugin147 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3438693
PO File19937
JavaScript112016
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_333333_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_cc0000_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_999999_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_21759b_256x240.png3.62KB4.11KB0.00%