83% thesis-openhook

Code Review | OpenHook

WordPress plugin OpenHook scored 83% from 54 tests.

About plugin

  • Plugin page: thesis-openhook
  • Plugin version: 4.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2008
  • Latest release: Sep 29, 2023
  • Number of updates: 95
  • Update frequency: every 57.0 days
  • Top authors: KingdomGeek (75.79%)BrazenlyGeek (25.26%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 275,041 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▲1.32ms] Passed 4 tests

An overview of server-side resources used by OpenHook
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.83 ▼3.50
Dashboard /wp-admin3.66 ▲0.3551.01 ▼0.82
Posts /wp-admin/edit.php3.77 ▲0.4250.58 ▲3.60
Add New Post /wp-admin/post-new.php6.24 ▲0.3597.18 ▲6.01
Media Library /wp-admin/upload.php3.58 ▲0.3541.40 ▲7.17
Server Info /wp-admin/options-general.php?page=openhook&tab=phpinfo3.7639.43
WordPress Hooks /wp-admin/options-general.php?page=openhook&tab=wordpress3.5233.12
OpenHook /wp-admin/options-general.php?page=openhook3.5533.93

Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • There were 1 file (1.83KB) illegally modified outside of "wp-content/plugins/thesis-openhook/" and "wp-content/uploads/"
    • (new file) wp-content/thesis/boxes/openbox/box.php
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
openhook_version
openhook_general
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by OpenHook
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5513.24 ▼1.371.78 ▼0.3244.21 ▼2.28
Dashboard /wp-admin2,215 ▲275.86 ▲0.9999.39 ▼22.6439.52 ▼6.92
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0544.76 ▲4.7535.92 ▲3.15
Add New Post /wp-admin/post-new.php1,543 ▲722.99 ▼0.50655.95 ▼21.9655.74 ▼14.50
Media Library /wp-admin/upload.php1,394 ▲94.21 ▼0.0294.35 ▼8.8442.02 ▼2.41
Server Info /wp-admin/options-general.php?page=openhook&tab=phpinfo6,2631.6927.4287.24
WordPress Hooks /wp-admin/options-general.php?page=openhook&tab=wordpress1,2872.0939.5542.65
OpenHook /wp-admin/options-general.php?page=openhook1,0881.9743.0036.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • openhook_version
    • widget_theysaidso_widget
    • openhook_general
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=openhook&tab=wordpress
    • > Notice in wp-content/plugins/thesis-openhook/inc/admin.php+244
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

thesis-openhook/index.php 85% from 13 tests

"OpenHook" version 4.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 256 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("thesis-openhook.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,556 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP41933941,518
CSS41138

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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 complexity63.00
▷ Minimum class complexity12.00
▷ Maximum class complexity108.00
Average method complexity5.23
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods2862.22%
▷ Protected methods00.00%
▷ Private methods1737.78%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/img/gg2wd.png18.77KB6.11KB▼ 67.45%