84% keyboard-scroll

Code Review | Keyboard Scroll

WordPress plugin Keyboard Scroll scored84%from 54 tests.

About plugin

  • Plugin page: keyboard-scroll
  • Plugin version: 1.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7
  • WordPress version: 6.3.1
  • First release: Nov 6, 2013
  • Latest release: Nov 7, 2013
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: Latz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,016 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Keyboard Scroll
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.37 ▼7.93
Dashboard /wp-admin3.33 ▲0.0249.56 ▼1.03
Posts /wp-admin/edit.php3.38 ▲0.0249.58 ▲3.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.59 ▲7.66
Media Library /wp-admin/upload.php3.25 ▲0.0238.04 ▲0.77
Keyboard Scroll /wp-admin/options-general.php?page=keyboard-scroll3.2429.60

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
keyboard-scroll
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Keyboard Scroll
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲25614.04 ▼0.579.84 ▲7.7239.37 ▼4.29
Dashboard /wp-admin2,210 ▲224.85 ▼1.02109.82 ▼3.7837.70 ▼5.44
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.1440.40 ▲3.6534.16 ▲0.37
Add New Post /wp-admin/post-new.php1,531 ▲1123.00 ▼0.18672.89 ▼25.3358.11 ▲3.64
Media Library /wp-admin/upload.php1,392 ▲74.23 ▼0.0192.91 ▼12.8141.66 ▼5.19
Keyboard Scroll /wp-admin/options-general.php?page=keyboard-scroll8522.0328.3531.45

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • keyboard-scroll
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/keyboard-scroll/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/keyboard-scroll/keyboard-scroll.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/keyboard-scroll/init-options.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: keyboard, navigation

keyboard-scroll/keyboard-scroll.php Passed 13 tests

The main file in "Keyboard Scroll" v. 1.05 serves as a complement to information provided in readme.txt and as the entry point to the plugin
39 characters long description:
Scroll through posts using the J/K keys

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected383 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33921169
JavaScript13415124
PO File2343890

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity9.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon_32x32.png4.67KB1.48KB▼ 68.22%