84% sticky-post-first-in-category

Code Review | Sticky Post First in Category

WordPress plugin Sticky Post First in Category scored84%from 54 tests.

About plugin

  • Plugin page: sticky-post-first...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Sep 8, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Sticky Post First in Category
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.31 ▲1.63
Dashboard /wp-admin3.32 ▲0.0242.11 ▼3.50
Posts /wp-admin/edit.php3.37 ▲0.0241.49 ▼2.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.14 ▼12.22
Media Library /wp-admin/upload.php3.25 ▲0.0239.54 ▲4.78

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Post First in Category
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5714.20 ▼0.141.66 ▼0.3040.36 ▲1.05
Dashboard /wp-admin2,216 ▲415.53 ▼0.1484.03 ▼24.0076.74 ▲30.89
Posts /wp-admin/edit.php2,115 ▲151.95 ▼0.0336.23 ▲1.5829.56 ▼3.84
Add New Post /wp-admin/post-new.php1,695 ▲16922.20 ▼1.41730.30 ▲29.7452.86 ▼5.00
Media Library /wp-admin/upload.php1,418 ▲244.12 ▼0.19101.67 ▲2.9070.87 ▲26.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-post-first-in-category/sticky-post-first-in-category.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Admin Panel view of submitted form data.) image required
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Sticky Post First in Category" version 1.1
83 characters long description:
Sticky Post First in Category WordPress plugin make the post first in the category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin143 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13612143

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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 functions787.50%
▷ Anonymous functions112.50%
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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.58KB1.43KB▼ 9.69%
images/logo.png11.25KB4.39KB▼ 60.99%