84% simple-scroll-up-button

Code Review | Simple Scroll Up Button

WordPress plugin Simple Scroll Up Button scored84%from 54 tests.

About plugin

  • Plugin page: simple-scroll-up-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 3, 2020
  • Latest release: Aug 12, 2020
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: wpforest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.73ms] Passed 4 tests

This is a short check of server-side resources used by Simple Scroll Up Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.80 ▼0.00
Dashboard /wp-admin3.32 ▼0.0250.95 ▼15.78
Posts /wp-admin/edit.php3.37 ▲0.0249.55 ▼2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.02120.82 ▲13.49
Media Library /wp-admin/upload.php3.25 ▲0.0233.79 ▼0.87
Simple Scroll Up Button /wp-admin/admin.php?page=simple-scroll-up-button3.2129.38
Settings /wp-admin/admin.php?page=simple-scroll-up-button-config3.2134.28

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Scroll Up Button: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.68 ▼0.492.27 ▲0.2344.12 ▲0.77
Dashboard /wp-admin2,244 ▲444.86 ▼1.05116.11 ▲14.4442.39 ▼4.59
Posts /wp-admin/edit.php2,126 ▲232.06 ▲0.0937.19 ▼3.8130.86 ▼6.86
Add New Post /wp-admin/post-new.php1,564 ▲1923.34 ▲0.23595.35 ▼10.3850.93 ▲7.52
Media Library /wp-admin/upload.php1,420 ▲204.15 ▼0.1097.26 ▼8.1042.01 ▼4.47
Simple Scroll Up Button /wp-admin/admin.php?page=simple-scroll-up-button7822.0523.7926.53
Settings /wp-admin/admin.php?page=simple-scroll-up-button-config8142.0233.9626.48

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • 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
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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-scroll-up-button/simple-scroll-up-button.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SimpleScrollUpButton\\plugin_dir_path() in wp-content/plugins/simple-scroll-up-button/admin/simple-scroll-up-button.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Button setting)
You can take inspiration from this readme.txt

simple-scroll-up-button/simple-scroll-up-button.php 92% from 13 tests

The main PHP file in "Simple Scroll Up Button" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected250 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP43728178
PO File18932
CSS12023
JavaScript11017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods861.54%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin