84% click-to-scroll

Code Review | Click to Scroll

WordPress plugin Click to Scroll scored84%from 54 tests.

About plugin

  • Plugin page: click-to-scroll
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Mar 13, 2017
  • Number of updates: 21
  • Update frequency: every 9.7 days
  • Top authors: skoldin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,475 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Click to Scroll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.36 ▲11.22
Dashboard /wp-admin3.50 ▲0.1649.15 ▼12.03
Posts /wp-admin/edit.php3.55 ▲0.2053.96 ▲6.32
Add New Post /wp-admin/post-new.php6.01 ▲0.1392.07 ▼2.68
Media Library /wp-admin/upload.php3.34 ▲0.1135.45 ▲0.15
Click to Scroll /wp-admin/options-general.php?page=cts-options3.3335.88

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
cts_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Click to Scroll
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,090 ▲35515.88 ▲1.138.25 ▲6.5546.09 ▲0.06
Dashboard /wp-admin2,382 ▲1916.65 ▲1.80141.26 ▲37.6442.09 ▼1.96
Posts /wp-admin/edit.php2,291 ▲1993.57 ▲1.5757.26 ▲16.4334.97 ▲0.30
Add New Post /wp-admin/post-new.php1,566 ▲3318.44 ▼4.65634.92 ▼53.0735.70 ▼29.36
Media Library /wp-admin/upload.php1,430 ▲424.36 ▼0.0284.88 ▼32.4743.00 ▼3.33
Click to Scroll /wp-admin/options-general.php?page=cts-options1,6734.3375.6228.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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
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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-scroll/inc/CTS_Backend.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function cts_get_options() on null in wp-content/plugins/click-to-scroll/inc/CTS_Frontend.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

click-to-scroll/click-to-scroll.php Passed 13 tests

"Click to Scroll" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Add a customizable scroll-to-top button to your site and the admin area

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin682 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP410343474
JavaScript34011137
CSS312071

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.33
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3482.93%
▷ Protected methods00.00%
▷ Private methods717.07%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin