84% scroll-tool

Code Review | Scroll tool

WordPress plugin Scroll tool scored84%from 54 tests.

About plugin

  • Plugin page: scroll-tool
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: May 16, 2019
  • Number of updates: 16
  • Update frequency: every 117.4 days
  • Top authors: fractal512 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼10.08ms] Passed 4 tests

Analyzing server-side resources used by Scroll tool
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1037.67 ▼7.84
Dashboard /wp-admin3.41 ▲0.1047.76 ▼9.32
Posts /wp-admin/edit.php3.46 ▲0.1049.64 ▼3.97
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.86 ▼19.18
Media Library /wp-admin/upload.php3.33 ▲0.1040.58 ▲3.88
Scroll Tool /wp-admin/themes.php?page=scroll-tool3.4431.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 107 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
lloo_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Scroll tool
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲9713.83 ▼0.769.15 ▲7.2945.33 ▲6.49
Dashboard /wp-admin2,199 ▲195.62 ▼0.0386.28 ▼5.2137.79 ▼5.19
Posts /wp-admin/edit.php2,104 ▲71.98 ▼0.0340.48 ▲3.8137.62 ▲2.15
Add New Post /wp-admin/post-new.php1,531 ▲522.91 ▼0.71723.40 ▲108.0456.91 ▲4.71
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0296.17 ▼9.9640.71 ▼8.06
Scroll Tool /wp-admin/themes.php?page=scroll-tool2,0542.2641.6474.85

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/scroll-tool/scroll-tool.php:608

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: sidebar, down, up, button, top...

scroll-tool/scroll-tool.php Passed 13 tests

The main PHP file in "Scroll tool" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
Allows to create scroll tool (button or sidebar) for your blog.

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
There were no executable files found in this plugin1,992 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript362101,163
PHP14127548
CSS391245
SVG360036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
58 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/down-3.png0.36KB0.70KB0.00%
img/colorpicker/colorpicker_submit.png0.73KB1.04KB0.00%
img/up-7.png0.30KB0.53KB0.00%
img/colorpicker/colorpicker_hex.png0.32KB0.42KB0.00%
img/down-12.png0.27KB0.53KB0.00%