84% astro-sticky-buttons

Code Review | Astro Sticky Buttons

WordPress plugin Astro Sticky Buttons scored84%from 54 tests.

About plugin

  • Plugin page: astro-sticky-buttons
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2023
  • Latest release: Sep 20, 2023
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: alian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /107 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.29ms] Passed 4 tests

This is a short check of server-side resources used by Astro Sticky Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.71 ▲4.44
Dashboard /wp-admin3.42 ▲0.1258.82 ▲8.01
Posts /wp-admin/edit.php3.53 ▲0.1855.13 ▲2.03
Add New Post /wp-admin/post-new.php6.02 ▲0.1494.89 ▼22.55
Media Library /wp-admin/upload.php3.34 ▲0.1243.44 ▲6.92
Sticky buttons /wp-admin/admin.php?page=astro-sticky-buttons3.5244.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Astro Sticky Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,996 ▲23514.13 ▼0.465.97 ▲3.5743.50 ▲3.19
Dashboard /wp-admin2,267 ▲645.29 ▼0.57113.94 ▲8.7584.75 ▲36.75
Posts /wp-admin/edit.php2,160 ▲602.39 ▲0.3538.67 ▼1.1838.50 ▲0.39
Add New Post /wp-admin/post-new.php1,582 ▲5123.50 ▲0.18674.24 ▼5.4637.05 ▼13.46
Media Library /wp-admin/upload.php1,462 ▲624.56 ▲0.1989.71 ▼26.5781.92 ▲33.16
Sticky buttons /wp-admin/admin.php?page=astro-sticky-buttons1,2602.1129.6635.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/astro-sticky-buttons/includes/tabs/tabs-nav.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/astro-sticky-buttons/includes/tabs/tab-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/astro-sticky-buttons/astro-sticky-buttons-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/astro-sticky-buttons/templates/astro-sticky-buttons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/astro-sticky-buttons/includes/tabs/tab-support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/astro-sticky-buttons/includes/tabs/tab-layout.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

astro-sticky-buttons/astro-sticky-buttons.php 92% from 13 tests

The main file in "Astro Sticky Buttons" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected6,772 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS82,529325,527
PHP9155941,232
JavaScript25513

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/astrothemes-icon.png1.13KB0.22KB▼ 80.67%