10% responsive-page-scroller

Code Review | Responsive Page Scroller

WordPress plugin Responsive Page Scroller scored10%from 54 tests.

About plugin

  • Plugin page: responsive-page-s...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2013
  • Latest release: Aug 12, 2013
  • Number of updates: 11
  • Update frequency: every 1.6 days
  • Top authors: fantastic plugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,216 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ResponsivePageScroller::add_pagescroll_option() should not be called statically

Server metrics [RAM: ▼0.87MB] [CPU: ▼36.47ms] Passed 4 tests

Analyzing server-side resources used by Responsive Page Scroller
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.32 ▲0.72
Dashboard /wp-admin3.07 ▼0.2322.83 ▼28.27
Posts /wp-admin/edit.php3.08 ▼0.2826.06 ▼25.49
Add New Post /wp-admin/post-new.php3.07 ▼2.8225.89 ▼77.37
Media Library /wp-admin/upload.php3.07 ▼0.1620.84 ▼14.75
Responsive Page Scroller /wp-admin/options-general.php?page=fantastic_page_scroller_button3.0825.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 13 new options
New WordPress options
scroller_credit_link
widget_recent-comments
db_upgraded
can_compress_scripts
scroller_credit_text_new
page_align
theysaidso_admin_options
widget_theysaidso_widget
scroller_credits_defaults_new
scroller_credits_nofollow_new
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Page Scroller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲25013.67 ▼0.7111.89 ▲9.9943.88 ▲1.03
Dashboard /wp-admin2,213 ▲254.87 ▼0.1797.95 ▼6.2440.93 ▼3.59
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0036.33 ▼5.9832.16 ▼5.41
Add New Post /wp-admin/post-new.php1,517 ▼1617.72 ▼5.59675.26 ▼10.4063.71 ▼1.18
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0293.54 ▼13.8341.55 ▼8.03
Responsive Page Scroller /wp-admin/options-general.php?page=fantastic_page_scroller_button9671.7227.3143.14

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ResponsivePageScroller::fantastic_page_scroll_admin_menu() should not be called statically
  • Zombie WordPress options detected upon uninstall: 13 options
    • db_upgraded
    • page_align
    • page_align_image
    • widget_recent-comments
    • scroller_credit_link
    • scroller_credits_nofollow_new
    • widget_recent-posts
    • widget_theysaidso_widget
    • scroller_credit_text_new
    • scroller_credits
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=fantastic_page_scroller_button
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ResponsivePageScroller::fantastic_page_scroll_admin_menu() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=fantastic_page_scroller_button
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ResponsivePageScroller::update_pagescroll_option() should not be called statically

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-page-scroller/responsivepagescroller.php:551

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === responsive-page-scroller === )
You can take inspiration from this readme.txt

responsive-page-scroller/responsivepagescroller.php 85% from 13 tests

The main PHP file in "Responsive Page Scroller" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 242 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("responsive-page-scroller.php" instead of "responsivepagescroller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected878 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP213615658
CSS1360220

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity6.40
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
53 PNG files occupy 0.15MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/arrow-1up.png1.38KB1.11KB▼ 19.15%
assets/arrowup.png4.33KB1.29KB▼ 70.25%
assets/circle22.png1.27KB0.75KB▼ 40.57%
assets/rectn2.png1.76KB1.05KB▼ 40.17%
assets/square1.png1.09KB0.71KB▼ 35.07%