78% lonely-sticky

Code Review | Lonely Sticky

WordPress plugin Lonely Sticky scored78%from 54 tests.

About plugin

  • Plugin page: lonely-sticky
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Sep 4, 2020
  • Number of updates: 11
  • Update frequency: every 171.3 days
  • Top authors: andg (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,097 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Lonely Sticky
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.03 ▲3.57
Dashboard /wp-admin3.35 ▲0.0152.62 ▼13.37
Posts /wp-admin/edit.php3.47 ▲0.1153.63 ▲8.00
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.06 ▼34.00
Media Library /wp-admin/upload.php3.28 ▲0.0535.50 ▼3.19
Lonely Sticky /wp-admin/options-general.php?page=lonely-sticky3.2438.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Lonely Sticky
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.37 ▲0.141.98 ▲0.1442.56 ▲1.67
Dashboard /wp-admin2,203 ▲325.66 ▲0.0597.74 ▲9.0243.00 ▲2.64
Posts /wp-admin/edit.php2,105 ▲51.97 ▼0.0634.37 ▼3.4834.59 ▲0.17
Add New Post /wp-admin/post-new.php1,533 ▲123.06 ▼0.06680.19 ▼14.9273.43 ▲17.72
Media Library /wp-admin/upload.php1,405 ▲54.24 ▲0.07100.64 ▲5.1544.34 ▲1.37
Lonely Sticky /wp-admin/options-general.php?page=lonely-sticky8532.0525.8431.26

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lonely-sticky/config/install.php
    • > /wp-content/plugins/lonely-sticky/lonely_sticky.php
    • > /wp-content/plugins/lonely-sticky/config/config.php
    • > /wp-content/plugins/lonely-sticky/config/helpers.php
    • > /wp-content/plugins/lonely-sticky/settings/class-settings-page.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lonely-sticky/settings/templates/setting-field-checkbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lonely-sticky/settings/templates/setting-field-select.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lonely-sticky/settings/templates/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lonely-sticky/settings/templates/setting-field-text.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lonely-sticky/settings/templates/setting-field-textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/lonely-sticky/settings/templates/setting-field-number.php:6

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Plugin Name: You should set the name of your plugin on the first line ( === lonely-sticky === )
You can look at the official readme.txt

lonely-sticky/lonely_sticky.php 92% from 13 tests

The principal PHP file in "Lonely Sticky" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lonely-sticky.php" instead of "lonely_sticky.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected357 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11101160343
CSS12014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/made_by_logo.png4.24KB4.47KB0.00%