90% tag-sticky-post

Code Review | Tag Sticky Post

WordPress plugin Tag Sticky Post scored90%from 54 tests.

About plugin

  • Plugin page: tag-sticky-post
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2012
  • Latest release: Jan 7, 2017
  • Number of updates: 25
  • Update frequency: every 64.4 days
  • Top authors: tommcfarlin (92%)philiparthurmoore (12%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,003 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.85ms] Passed 4 tests

A check of server-side resources used by Tag Sticky Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.44 ▼4.35
Dashboard /wp-admin3.31 ▼0.0342.61 ▼15.87
Posts /wp-admin/edit.php3.36 ▲0.0145.57 ▲0.60
Add New Post /wp-admin/post-new.php5.94 ▲0.0677.20 ▼19.79
Media Library /wp-admin/upload.php3.24 ▲0.0134.43 ▲2.73

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Tag Sticky Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.081.63 ▼0.0542.15 ▲2.35
Dashboard /wp-admin2,203 ▲155.86 ▼0.0094.99 ▼14.2341.50 ▼1.64
Posts /wp-admin/edit.php2,094 ▲52.04 ▲0.0240.35 ▲4.9434.32 ▼1.91
Add New Post /wp-admin/post-new.php6,226 ▲4,70725.75 ▲2.41865.99 ▲240.5258.70 ▲6.07
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0293.92 ▼11.1743.71 ▲0.58

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (A post marked as a 'Tag Sticky' displaying at the top of an archive page), #2 (The new menu item for selecting which in which tag to stick the given post), #3 (Disabled options show that a tag already has a sticky post), #4 (The post dashboard indicating which entries are tag sticky posts)
You can look at the official readme.txt

tag-sticky-post/tag-sticky-post.php Passed 13 tests

"Tag Sticky Post" version 2.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
115 characters long description:
Mark a post to be placed at the top of a specified category archive. It's sticky posts specifically for categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected240 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106174175
JavaScript49424
PO File13322
LESS271017
CSS2002

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.50
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions0
▷ Named functions00.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.45MB with 0.31MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png147.19KB49.24KB▼ 66.55%
screenshot-1.png222.36KB58.24KB▼ 73.81%
screenshot-3.png63.45KB20.50KB▼ 67.69%
screenshot-2.png25.76KB7.06KB▼ 72.61%