83% w3scroll-top

Code Review | W3Scroll Top

WordPress plugin W3Scroll Top scored83%from 54 tests.

About plugin

  • Plugin page: w3scroll-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: May 16, 2015
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: faruque82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by W3Scroll Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.19 ▼2.87
Dashboard /wp-admin3.31 ▲0.0049.72 ▼2.60
Posts /wp-admin/edit.php3.36 ▲0.0053.40 ▲1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.59 ▼2.05
Media Library /wp-admin/upload.php3.23 ▲0.0036.55 ▼2.82

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for W3Scroll Top
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.79 ▼0.6211.58 ▲9.9147.26 ▲4.66
Dashboard /wp-admin2,195 ▲185.63 ▼0.0293.57 ▲6.3743.23 ▼0.18
Posts /wp-admin/edit.php2,103 ▲32.11 ▲0.0845.95 ▲3.8536.46 ▼0.77
Add New Post /wp-admin/post-new.php1,528 ▲223.19 ▼0.00660.33 ▲45.1154.33 ▲1.14
Media Library /wp-admin/upload.php1,403 ▲64.13 ▼0.0896.52 ▼12.0244.58 ▼2.11

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

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)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/w3scroll-top/plugin-hook.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/w3scroll-top/plugin-hook.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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: A description for screenshot #1 is required in w3scroll-top/assets to your readme.txt
Please take inspiration from this readme.txt

w3scroll-top/plugin-hook.php 85% from 13 tests

Analyzing the main PHP file in "W3Scroll Top" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("w3scroll-top.php" instead of "plugin-hook.php")
  • Description: The description should be shorter than 140 characters (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24114291
CSS2419194
PHP1181514

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/text.png1.95KB1.17KB▼ 40.29%
img/text-hover.png1.95KB1.22KB▼ 37.73%