90% category-sticky-post

Code Review | Category Sticky Post

WordPress plugin Category Sticky Post scored90%from 54 tests.

About plugin

  • Plugin page: category-sticky-post
  • Plugin version: 2.10.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2012
  • Latest release: Jan 19, 2017
  • Number of updates: 48
  • Update frequency: every 33.5 days
  • Top authors: tommcfarlin (93.75%)philiparthurmoore (8.33%)

Code review

54 tests

User reviews

23 reviews

Install metrics

5,000+ active /74,296 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.15ms] Passed 4 tests

Server-side resources used by Category Sticky Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0448.55 ▼4.92
Dashboard /wp-admin3.35 ▲0.0457.73 ▼6.68
Posts /wp-admin/edit.php3.40 ▲0.0454.27 ▼6.55
Add New Post /wp-admin/post-new.php5.99 ▲0.10121.54 ▲20.34
Media Library /wp-admin/upload.php3.27 ▲0.0447.20 ▲5.56

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Category Sticky Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3413.99 ▼0.361.90 ▲0.0854.60 ▲0.68
Dashboard /wp-admin2,201 ▲365.59 ▼0.01112.43 ▼0.5745.92 ▼6.34
Posts /wp-admin/edit.php2,109 ▲62.01 ▼0.0045.69 ▼0.4939.12 ▼3.13
Add New Post /wp-admin/post-new.php1,534 ▲818.31 ▼4.54843.41 ▲86.5873.74 ▲2.41
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.11133.91 ▲10.1060.81 ▲8.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: categories, post

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

"Category Sticky Post" version 2.10.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin282 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP295202160
PO File3121272
JavaScript416830
LESS291017
CSS2003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods960.00%
▷ Protected methods00.00%
▷ Private methods640.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin