10% hot-corners

Code Review | Hot Corners

WordPress plugin Hot Corners scored10%from 54 tests.

About plugin

  • Plugin page: hot-corners
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2015
  • Latest release: Mar 3, 2021
  • Number of updates: 19
  • Update frequency: every 100.7 days
  • Top authors: rich_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,588 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/hot-corners/hot-corners.php+33
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.18ms] Passed 4 tests

This is a short check of server-side resources used by Hot Corners
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0031.59 ▼10.98
Dashboard /wp-admin3.37 ▲0.0755.10 ▲5.09
Posts /wp-admin/edit.php3.43 ▲0.0747.86 ▲0.50
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.38 ▲2.90
Media Library /wp-admin/upload.php3.30 ▲0.0733.41 ▼5.12

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
wphc-special-message
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
wphc_tool_bar_array
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Hot Corners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,725 ▼3713.37 ▼0.788.62 ▲6.9036.13 ▼11.95
Dashboard /wp-admin2,199 ▲225.65 ▼0.0197.79 ▼5.7342.49 ▼5.87
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0239.62 ▼2.6236.21 ▼0.33
Add New Post /wp-admin/post-new.php1,531 ▼423.19 ▼1.95574.01 ▼66.1642.63 ▼29.21
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.0198.71 ▲1.8842.06 ▼0.66
Hot Corners /wp-admin/wphc-settings.php260.410.0815.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • wphc_tool_bar_array
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hot-corners/_hc-functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hot-corners/activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hot-corners/_hc-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hot-corners/_hc-output.php:153
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hot-corners/activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hot-corners/_hc-settings.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/wphc-settings.php
    • > Network (severe)
    wp-admin/wphc-settings.php - Failed to load resource: the server responded with a status of 404 (Not 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
1 plugin tags: toolbar

hot-corners/hot-corners.php Passed 13 tests

The main PHP file in "Hot Corners" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Replace the WP Admin bar with invisible corner menus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,130 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73231151,174
PHP610142553
Sass3578385
JSON10016
CSS2022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/trash.png1.43KB0.87KB▼ 39.03%
assets/images/beercon.png1.86KB2.20KB0.00%