83% ultimate-sticky-posts

Code Review | Ultimate Sticky Posts Widget

WordPress plugin Ultimate Sticky Posts Widget scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-sticky-p...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2015
  • Latest release: Jan 30, 2018
  • Number of updates: 25
  • Update frequency: every 36.0 days
  • Top authors: Pieter Ferrreira (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /5,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.96ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Sticky Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.0746.94 ▲4.96
Dashboard /wp-admin3.63 ▲0.0752.63 ▼2.89
Posts /wp-admin/edit.php3.75 ▲0.0752.91 ▼6.34
Add New Post /wp-admin/post-new.php6.22 ▲0.0788.45 ▼19.58
Media Library /wp-admin/upload.php3.56 ▲0.0743.14 ▲6.22

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_bsp_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Sticky Posts Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.40 ▼0.192.28 ▲0.6346.08 ▲1.57
Dashboard /wp-admin2,195 ▲185.65 ▼0.0695.23 ▲7.5241.71 ▼1.65
Posts /wp-admin/edit.php2,100 ▼32.05 ▲0.0434.60 ▼5.0935.81 ▼2.32
Add New Post /wp-admin/post-new.php1,540 ▼523.06 ▼0.13662.58 ▼27.9151.61 ▼3.20
Media Library /wp-admin/upload.php1,400 ▲34.23 ▼0.06100.94 ▼5.0342.75 ▼4.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_bsp_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 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/ultimate-sticky-posts/sticky-posts.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (General Options), #2 (Example with TwentyFifteene theme with the default widget options)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === ultimate-sticky-posts === )
You can look at the official readme.txt

ultimate-sticky-posts/sticky-posts.php 92% from 13 tests

Analyzing the main PHP file in "Ultimate Sticky Posts Widget" version 3.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ultimate-sticky-posts.php" instead of "sticky-posts.php")

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
Success! There were no dangerous files found in this plugin313 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15820313

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.53MB with 0.38MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png67.75KB21.13KB▼ 68.82%
screenshot-2.png477.06KB115.82KB▼ 75.72%