83% ultimate-sticky-popup-widgets

Code Review | Ultimate Sticky Popup & Widgets

WordPress plugin Ultimate Sticky Popup & Widgets scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-sticky-p...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 12
  • Update frequency: every 35.3 days
  • Top authors: itpathsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,084 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.13MB] [CPU: ▼3.07ms] Passed 4 tests

An overview of server-side resources used by Ultimate Sticky Popup & Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.79 ▲1.54
Dashboard /wp-admin3.42 ▲0.1251.61 ▲1.12
Posts /wp-admin/edit.php3.53 ▲0.1847.74 ▼1.12
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.96 ▼10.17
Media Library /wp-admin/upload.php3.34 ▲0.1137.80 ▼2.10

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate Sticky Popup & Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲15713.92 ▼0.678.03 ▲6.2942.83 ▼2.77
Dashboard /wp-admin2,223 ▲325.81 ▲0.92101.12 ▼10.0543.35 ▼1.25
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0136.43 ▼5.1233.17 ▼4.39
Add New Post /wp-admin/post-new.php1,531 ▲1023.16 ▼0.09638.34 ▼28.9150.11 ▼1.75
Media Library /wp-admin/upload.php1,408 ▲234.27 ▲0.1195.27 ▼7.5141.33 ▼6.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Sticky_Popup_And_Widgets' not found in wp-content/plugins/ultimate-sticky-popup-widgets/admin/partials/ultimate-sticky-popup-and-widgets-admin-display.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ultimate-sticky-popup-widgets/public/partials/ultimate-sticky-popup-and-widgets-public-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/ultimate-sticky-popup-widgets/public/partials/uspaw-social-share-display.php:2

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: sticky popup, popup, popup and widgets, sticky popup and widgets

ultimate-sticky-popup-widgets/ultimate-sticky-popup-and-widgets.php 77% from 13 tests

"Ultimate Sticky Popup & Widgets" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 243 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ultimate-sticky-popup-widgets.php" instead of "ultimate-sticky-popup-and-widgets.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
Everything looks great! No dangerous files found in this plugin1,844 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS67326918
PHP13144560693
JavaScript103869174
SVG10159

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods38.33%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/any-post-slider.png107.80KB44.55KB▼ 58.68%
admin/images/cf7-to-any-api.png88.19KB31.22KB▼ 64.60%
public/images/envelope.png1.41KB0.80KB▼ 43.07%