79% tha-hooks-interface

Code Review | THA Hooks Interface

WordPress plugin THA Hooks Interface scored79%from 54 tests.

About plugin

  • Plugin page: tha-hooks-interface
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: Sep 10, 2015
  • Number of updates: 7
  • Update frequency: every 95.0 days
  • Top authors: slobodanmanic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,130 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.36ms] Passed 4 tests

A check of server-side resources used by THA Hooks Interface
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.45 ▼2.27
Dashboard /wp-admin3.33 ▲0.0350.11 ▼0.64
Posts /wp-admin/edit.php3.38 ▲0.0351.54 ▲3.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.54 ▼5.72
Media Library /wp-admin/upload.php3.26 ▲0.0340.86 ▲7.23
THA Hooks /wp-admin/options-general.php?page=tha-hooks-interface3.2533.71

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by THA Hooks Interface
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8914.81 ▲0.551.60 ▼0.1143.66 ▼3.76
Dashboard /wp-admin2,253 ▲795.78 ▲0.26100.02 ▲6.3240.53 ▲4.35
Posts /wp-admin/edit.php2,161 ▲582.27 ▲0.2548.48 ▲5.1736.24 ▼0.04
Add New Post /wp-admin/post-new.php1,538 ▲123.10 ▲4.85644.75 ▼3.2154.52 ▼8.56
Media Library /wp-admin/upload.php1,461 ▲614.40 ▲0.21100.56 ▼2.7543.29 ▲1.01
THA Hooks /wp-admin/options-general.php?page=tha-hooks-interface9191.9734.3031.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=tha-hooks-interface
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tha-hooks-interface
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tha-hooks-interface
    • > Notice in wp-content/plugins/tha-hooks-interface/admin/class-tha-hooks-interface-admin.php+391
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tha-hooks-interface
    • > Notice in wp-content/plugins/tha-hooks-interface/admin/class-tha-hooks-interface-admin.php+391
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/tha-hooks-interface/admin/views/admin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: thematosoup, hooks, tha, theme hook alliance

tha-hooks-interface/tha-hooks-interface.php Passed 13 tests

Analyzing the main PHP file in "THA Hooks Interface" version 1.1.1
139 characters long description:
Allows you to hook into Theme Hook Alliance hooks using a simple interface. Also works with standard WordPress hooks wp_head and wp_footer.

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 plugin551 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7160378551

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity23.50
▷ Minimum class complexity17.00
▷ Maximum class complexity30.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods52
▷ Static methods713.46%
▷ Public methods4790.38%
▷ Protected methods00.00%
▷ Private methods59.62%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin