84% beam-me-up-scotty

Code Review | Beam me up Scotty - Back to Top Button

WordPress plugin Beam me up Scotty - Back to Top Button scored84%from 54 tests.

About plugin

  • Plugin page: beam-me-up-scotty
  • Plugin version: 1.0.19
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 7, 2016
  • Latest release: Sep 4, 2023
  • Number of updates: 21
  • Update frequency: every 118.5 days
  • Top authors: outtheboxthemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /34,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.67ms] Passed 4 tests

Analyzing server-side resources used by Beam me up Scotty - Back to Top Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2059.81 ▲15.15
Dashboard /wp-admin3.50 ▲0.2059.57 ▲1.17
Posts /wp-admin/edit.php3.61 ▲0.2654.83 ▲6.42
Add New Post /wp-admin/post-new.php6.08 ▲0.2090.65 ▼24.57
Media Library /wp-admin/upload.php3.42 ▲0.2043.96 ▲10.29
Beam me up Scotty1 /wp-admin/themes.php?page=beam-me-up-scotty_settings3.4044.17

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Beam me up Scotty - Back to Top Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16513.56 ▼1.0410.44 ▲8.6255.00 ▲12.28
Dashboard /wp-admin2,205 ▲255.55 ▼0.0287.00 ▼4.5138.75 ▲3.29
Posts /wp-admin/edit.php2,113 ▲161.95 ▼0.0434.87 ▼5.8037.30 ▼1.10
Add New Post /wp-admin/post-new.php1,548 ▲2018.23 ▼4.84620.04 ▲13.2465.28 ▲13.37
Media Library /wp-admin/upload.php1,410 ▲104.24 ▲0.0597.26 ▼10.5642.32 ▼3.54
Beam me up Scotty1 /wp-admin/themes.php?page=beam-me-up-scotty_settings1,1601.7629.9339.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • beam_me_up_scotty_version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • otb_new_theme
    • widget_recent-posts
    • widget_theysaidso_widget
    • otb_new_plugin

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beam-me-up-scotty/library/template-parts/tabs.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/beam-me-up-scotty/library/includes/dynamic-css.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/beam-me-up-scotty/library/template-parts/content-themes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/beam-me-up-scotty/library/template-parts/content-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/beam-me-up-scotty/library/template-parts/content-plugins.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/beam-me-up-scotty/library/template-parts/back-to-top-button.php:1

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

beam-me-up-scotty/beam-me-up-scotty.php Passed 13 tests

"Beam me up Scotty - Back to Top Button" version 1.0.19's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
103 characters long description:
Add a back to top button to your site quickly and easily with this simple and easy to configure plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected10,121 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS556315,016
SVG1002,671
JavaScript83672221,520
PHP12266344914

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.67
▷ Minimum class complexity13.00
▷ Maximum class complexity75.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3592.11%
▷ Protected methods12.63%
▷ Private methods25.26%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin