84% wp-smooth-scroll

Code Review | WP-Smooth-Scroll

WordPress plugin WP-Smooth-Scroll scored84%from 54 tests.

About plugin

  • Plugin page: wp-smooth-scroll
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Jan 14, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: arsho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.33MB] [CPU: ▼13.33ms] Passed 4 tests

Server-side resources used by WP-Smooth-Scroll
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.44 ▼37.35
Dashboard /wp-admin3.33 ▲0.0246.61 ▼6.80
Posts /wp-admin/edit.php3.38 ▲0.0248.98 ▼1.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.66 ▼7.98
Media Library /wp-admin/upload.php3.25 ▲0.0237.29 ▲2.00
Settings /wp-admin/admin.php?page=WP-Smooth-Scroll-settings3.2230.71
About /wp-admin/admin.php?page=WP-Smooth-Scroll-about3.2130.83

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP-Smooth-Scroll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15813.60 ▼0.986.05 ▲4.1443.75 ▲2.94
Dashboard /wp-admin2,233 ▲455.89 ▲0.00109.64 ▲5.3342.11 ▼2.44
Posts /wp-admin/edit.php2,119 ▲302.01 ▼0.0238.69 ▲0.2035.69 ▲1.63
Add New Post /wp-admin/post-new.php1,542 ▲2823.19 ▲5.50671.12 ▼14.5952.51 ▼5.44
Media Library /wp-admin/upload.php1,415 ▲274.23 ▲0.02105.93 ▼5.7846.96 ▲1.06
Settings /wp-admin/admin.php?page=WP-Smooth-Scroll-settings8232.0423.9559.67
About /wp-admin/admin.php?page=WP-Smooth-Scroll-about8692.0526.6033.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-smooth-scroll/settingpage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-smooth-scroll/helppage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-smooth-scroll/wp-smooth-scroll.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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:
  • Screenshots: Add images for these screenshots: #1 (WP-Smooth-Scroll on Bottom-right position.), #2 (WP-Smooth-Scroll on Bottom-right position after mouse hover.), #3 (WP-Smooth-Scroll on Bottom-middle position with dark background of the theme.), #4 (WP-Smooth-Scroll on Bottom-middle position after mouse hover with dark background of the theme.)
You can look at the official readme.txt

wp-smooth-scroll/wp-smooth-scroll.php Passed 13 tests

The main PHP file in "WP-Smooth-Scroll" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
84 characters long description:
WP-Smooth-Scroll is a plugin that helps users to scroll smoothly to top of the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected543 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS298328
PHP34037199
JavaScript11116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png2.15KB1.67KB▼ 22.39%
screenshot-2.png2.74KB2.13KB▼ 22.42%
screenshot-4.png2.19KB1.89KB▼ 13.81%
screenshot-3.png1.80KB1.63KB▼ 9.43%
images/wp-smooth-scroll.png6.50KB2.88KB▼ 55.62%