84% ss-awesome-scroll-top

Code Review | SS Awesome Scroll Top

WordPress plugin SS Awesome Scroll Top scored84%from 54 tests.

About plugin

  • Plugin page: ss-awesome-scroll...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 17, 2015
  • Latest release: Dec 17, 2015
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: ohidul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.68ms] Passed 4 tests

Server-side resources used by SS Awesome Scroll Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.23 ▼4.05
Dashboard /wp-admin3.34 ▼0.0149.17 ▼16.04
Posts /wp-admin/edit.php3.39 ▲0.0358.98 ▲5.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.30 ▼14.08
Media Library /wp-admin/upload.php3.26 ▲0.0339.18 ▼0.56
SS Awesome Scroll Top /wp-admin/options-general.php?page=ss-awesome-scroll-top-options3.2337.79

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SS Awesome Scroll Top
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲9813.35 ▼1.289.60 ▲7.7043.94 ▲3.79
Dashboard /wp-admin2,206 ▲285.58 ▼0.1092.68 ▼7.7641.27 ▼2.51
Posts /wp-admin/edit.php2,111 ▲112.00 ▲0.0639.98 ▼0.8941.60 ▲1.10
Add New Post /wp-admin/post-new.php1,436 ▼9022.41 ▼0.58512.29 ▼107.1528.13 ▼25.41
Media Library /wp-admin/upload.php1,411 ▲114.23 ▲0.01101.22 ▼0.5138.76 ▼5.87
SS Awesome Scroll Top /wp-admin/options-general.php?page=ss-awesome-scroll-top-options8562.0427.3927.84

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/ss-awesome-scroll-top/plugin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot1.png), #2 (Screenshot2.png)
You can look at the official readme.txt

ss-awesome-scroll-top/plugin.php 92% from 13 tests

The primary PHP file in "SS Awesome Scroll Top" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ss-awesome-scroll-top.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin127 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17050106
CSS17121

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.03
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/rocket1.png2.71KB2.10KB▼ 22.42%
Screenshot2.png19.59KB7.17KB▼ 63.39%
Screenshot1.png55.61KB20.26KB▼ 63.58%
img/rocket3.png2.77KB2.12KB▼ 23.53%
img/rocket2.png7.06KB2.82KB▼ 60.07%