88% wp-hotkeys

Code Review | WP Hotkeys

WordPress plugin WP Hotkeys scored 88% from 54 tests.

About plugin

  • Plugin page: wp-hotkeys
  • Plugin version: 0.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Feb 16, 2014
  • Latest release: Jun 21, 2021
  • Number of updates: 32
  • Update frequency: every 84.7 days
  • Top authors: McGuive7 (81.25%)aaronbmm (21.88%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 3,333 total downloads

Benchmarks

Plugin footprint Passed 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.22MB] [CPU: ▼121.51ms] Passed 4 tests

Analyzing server-side resources used by WP Hotkeys
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2238.57 ▲7.96
Dashboard /wp-admin3.28 ▲0.2279.61 ▲30.04
Posts /wp-admin/edit.php3.40 ▲0.2980.81 ▲32.40
Add New Post /wp-admin/post-new.php5.63 ▲0.20120.56 ▼556.45
Media Library /wp-admin/upload.php3.23 ▲0.2375.79 ▲41.47
WP Hotkeys /wp-admin/options-general.php?page=wp-hotkeys3.1866.64

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
wh-options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Hotkeys
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,963 ▲36816.38 ▲0.8010.27 ▲0.8846.02 ▼7.05
Dashboard /wp-admin3,227 ▲2936.63 ▲0.68167.13 ▼0.66117.06 ▼1.76
Posts /wp-admin/edit.php3,037 ▲3013.02 ▲0.3276.50 ▲10.0493.99 ▼6.61
Add New Post /wp-admin/post-new.php1,797 ▲11416.93 ▼1.51365.01 ▼74.16112.68 ▼5.48
Media Library /wp-admin/upload.php2,111 ▲3015.37 ▲0.35162.61 ▲0.31129.76 ▲1.18
WP Hotkeys /wp-admin/options-general.php?page=wp-hotkeys3,5642.4777.51106.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-hotkeys
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-hotkeys
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-hotkeys
    • > Notice in wp-content/plugins/wp-hotkeys/lib/admin/admin.php+280
    Undefined index: modifier-themes.php-customize.php?return=%2Fwp-admin%2Foptions-general.php%3Fpage%3Dwp-hotkeys&autofocus%5Bcontrol%5D=background_image

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
Almost there! Just 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/wp-hotkeys/lib/admin/admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hotkeys/lib/admin/admin.php:22

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

wp-hotkeys/wp-hotkeys.php Passed 13 tests

The main file in "WP Hotkeys" v. 0.9.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
72 characters long description:
Provides keyboard shortcuts to quickly navigate the WordPress dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin646 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3203248467
JavaScript27448167
CSS14612

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected