10% magic-scroller

Code Review | magic scroller

WordPress plugin magic scroller scored10%from 54 tests.

About plugin

  • Plugin page: magic-scroller
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Sep 4, 2021
  • Latest release: Sep 11, 2021
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: salehattari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /358 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/magic-scroller/inc/admin.php+48
    Undefined index: magic_scroller_back_sc_color

Server metrics [RAM: ▼1.93MB] [CPU: ▼48.97ms] Passed 4 tests

Server-side resources used by magic scroller
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.28 ▼29.80
Dashboard /wp-admin2.08 ▼1.235.81 ▼40.26
Posts /wp-admin/edit.php2.08 ▼1.286.80 ▼40.53
Add New Post /wp-admin/post-new.php2.08 ▼3.816.66 ▼85.30
Media Library /wp-admin/upload.php2.08 ▼1.156.40 ▼23.21
magic scroller /wp-admin/admin.php?page=magic_scroller2.086.00
learn use plugin /wp-admin/admin.php?page=magic_scroller_work2.086.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

magic scroller: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲6713.16 ▼1.461.80 ▲0.1138.52 ▼3.09
Dashboard /wp-admin2,238 ▲504.85 ▼1.01107.06 ▼12.3042.05 ▼7.68
Posts /wp-admin/edit.php2,121 ▲322.16 ▲0.1440.12 ▲2.0337.79 ▲3.85
Add New Post /wp-admin/post-new.php1,393 ▼14916.58 ▼1.72540.49 ▼109.6851.45 ▼7.67
Media Library /wp-admin/upload.php1,423 ▲354.19 ▼0.00102.76 ▼1.3839.77 ▼3.20
magic scroller /wp-admin/admin.php?page=magic_scroller8812.0625.3625.74
learn use plugin /wp-admin/admin.php?page=magic_scroller_work8142.0523.7626.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/magic-scroller/inc/admin.php+48
    Undefined index: magic_scroller_back_sc_color
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/magic-scroller.php+38
    Undefined index: magic_scroller_back_sc_color
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/magic-scroller.php+39
    Undefined index: magic_scroller_sc_with
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/magic-scroller.php+42
    Undefined index: magic_scroller_sc_border
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/magic-scroller.php+43
    Undefined index: magic_scroller_sc_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/inc/admin.php+56
    Undefined index: magic_scrollerr_hover_back_sc_color
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > Notice in wp-content/plugins/magic-scroller/magic-scroller.php+46
    Undefined index: magic_scroller_hover_back_sc_color
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magic_scroller_work
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/magic-scroller/tpl/admin/work.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/magic-scroller/tpl/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/magic-scroller/inc/admin.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magic-scroller/magic-scroller.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: scrollbar, scroll color, color scrollbar, change scrollbar color, custom scroll

magic-scroller/magic-scroller.php 85% from 13 tests

The primary PHP file in "magic scroller" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/scroll-color/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin161 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43113161

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin