83% sticky-posts-dashboard-widget

Code Review | Sticky Posts Dashboard Widget

WordPress plugin Sticky Posts Dashboard Widget scored 83% from 54 tests.

About plugin

  • Plugin page: sticky-posts-dash...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 29, 2014
  • Latest release: Oct 29, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: f.staude (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,018 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Sticky Posts Dashboard Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.66 ▼5.81
Dashboard /wp-admin3.33 ▲0.0351.49 ▲2.40
Posts /wp-admin/edit.php3.38 ▲0.0248.66 ▲1.43
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.11 ▼5.33
Media Library /wp-admin/upload.php3.25 ▲0.0234.92 ▼0.40

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Sticky Posts Dashboard Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.69 ▼0.681.75 ▼0.1146.87 ▲4.46
Dashboard /wp-admin2,352 ▲1645.14 ▼0.76110.41 ▼5.5545.85 ▼4.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0237.39 ▼1.9735.00 ▲0.87
Add New Post /wp-admin/post-new.php1,545 ▲1218.24 ▼4.99602.15 ▼58.5060.30 ▲9.85
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0293.67 ▼10.9640.87 ▼4.54

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-posts-dashboard-widget/class-sticky-posts-dashboard-widget.php:26

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Dashboard Widget)
Please take inspiration from this readme.txt

sticky-posts-dashboard-widget/sticky-posts-dashboard-widget.php 85% from 13 tests

"Sticky Posts Dashboard Widget" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Success! There were no dangerous files found in this plugin422 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2403145
PHP22955104
PO File22864102
CSS211071

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods480.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png46.15KB13.83KB▼ 70.03%