84% mmk-scroll-to-top

Code Review | MMK Scroll To Top

WordPress plugin MMK Scroll To Top scored84%from 54 tests.

About plugin

  • Plugin page: mmk-scroll-to-top
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Jun 1, 2017
  • Number of updates: 10
  • Update frequency: every 42.0 days
  • Top authors: mmkjony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /662 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
Installer ran successfully

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

Server-side resources used by MMK Scroll To Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.23 ▼5.25
Dashboard /wp-admin3.32 ▼0.0246.37 ▼9.02
Posts /wp-admin/edit.php3.37 ▲0.0244.68 ▼1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.20 ▼22.97
Media Library /wp-admin/upload.php3.24 ▲0.0235.39 ▲0.27
MMK Scroll To Top /wp-admin/options-general.php?page=mmk-totop-settings-page3.2130.45

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

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

Browser metrics Passed 4 tests

A check of browser resources used by MMK Scroll To Top
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.98 ▼0.767.68 ▲5.7454.01 ▲13.06
Dashboard /wp-admin2,204 ▲165.82 ▲0.76100.40 ▼7.8838.12 ▼1.79
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0634.43 ▼8.4633.04 ▼3.54
Add New Post /wp-admin/post-new.php1,536 ▲2223.12 ▲5.62659.08 ▲27.5052.58 ▼15.76
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0297.97 ▲0.8444.38 ▲2.11
MMK Scroll To Top /wp-admin/options-general.php?page=mmk-totop-settings-page1,1712.2545.6332.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mmk-scroll-to-top/inc/settings.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mmk-scroll-to-top/inc/functions.php:56

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: scroll, scroll to top, button, to top, back to top

mmk-scroll-to-top/mmk-scroll-to-top.php Passed 13 tests

The main PHP script in "MMK Scroll To Top" version 1.0.1 is automatically included on every request by WordPress
128 characters long description:
A super simple, highly customizable and light-weight plugin that adds a smooth Scroll back to top button to your wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected341 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP57798321
CSS12913
JavaScript23157

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin