10% simple-hook-widget

Code Review | Simple Hook Widget

WordPress plugin Simple Hook Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-hook-widget
  • Plugin version: 2...
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.3.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2011
  • Latest release: Mar 15, 2012
  • Number of updates: 10
  • Update frequency: every 9.8 days
  • Top authors: eddiemoya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,204 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/simple-hook-widget/simple-hook-widget.php+158
    Non-static method Simple_Hook_Widget::register_widget() should not be called statically

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.32ms] Passed 4 tests

An overview of server-side resources used by Simple Hook Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.12 ▼35.54
Dashboard /wp-admin2.05 ▼1.306.14 ▼60.55
Posts /wp-admin/edit.php2.05 ▼1.316.12 ▼42.22
Add New Post /wp-admin/post-new.php2.05 ▼3.845.38 ▼86.97
Media Library /wp-admin/upload.php2.05 ▼1.185.46 ▼32.25

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_simple-hook

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Hook Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.22 ▼1.182.43 ▲0.5844.35 ▲3.50
Dashboard /wp-admin2,221 ▲185.91 ▲0.06105.29 ▼4.3740.24 ▼0.42
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0238.08 ▲1.2436.05 ▲1.88
Add New Post /wp-admin/post-new.php1,532 ▼823.17 ▲4.79664.60 ▲23.2461.75 ▼5.55
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.01102.56 ▲2.6043.33 ▼0.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simple-hook-widget/simple-hook-widget.php+158
    Non-static method Simple_Hook_Widget::register_widget() should not be called statically
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_simple-hook
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-hook-widget/simple-hook-widget.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-hook-widget/simple-use-examples.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: hook, development, custom hook, sidebar, widget

simple-hook-widget/simple-hook-widget.php 92% from 13 tests

The principal PHP file in "Simple Hook Widget" v. 2... is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "2...")

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
Everything looks great! No dangerous files found in this plugin106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25347106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected