68% hooked-editable-content

Code Review | Hooked Editable Content

WordPress plugin Hooked Editable Content scored 68% from 54 tests.

About plugin

  • Plugin page: hooked-editable-c...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 5.9.2
  • First release: Jun 27, 2017
  • Latest release: Mar 7, 2021
  • Number of updates: 35
  • Update frequency: every 38.5 days
  • Top authors: janwyl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 929 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲4.51MB] [CPU: ▼274.98ms] Passed 4 tests

Analyzing server-side resources used by Hooked Editable Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.36 ▲4.8576.43 ▲26.61
Dashboard /wp-admin8.38 ▲4.9859.52 ▲26.56
Posts /wp-admin/edit.php8.38 ▲4.7460.42 ▲17.05
Add New Post /wp-admin/post-new.php10.48 ▲3.48115.58 ▼1,166.85
Media Library /wp-admin/upload.php8.38 ▲5.0946.66 ▲23.31
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.3844.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 190 new files
Database: no new tables, 5 new options
New WordPress options
hooked_editable_content_options
fs_accounts
fs_gdpr
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

Hooked Editable Content: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,852 ▲13015.99 ▲0.436.66 ▲0.952.62 ▲0.13
Dashboard /wp-admin2,942 ▲886.08 ▼0.14122.38 ▼20.93183.02 ▲15.90
Posts /wp-admin/edit.php2,741 ▲503.26 ▲0.0265.82 ▲3.71158.40 ▲11.37
Add New Post /wp-admin/post-new.php1,664 ▲418.46 ▼2.83422.08 ▼22.57160.39 ▲2.45
Media Library /wp-admin/upload.php1,749 ▲495.63 ▲0.16140.57 ▼5.37205.56 ▲25.75
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4522.5553.80114.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/hooked-editable-content/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hooked-editable-content/freemius/templates/ajax-loader.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/hooked-editable-content/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/hooked-editable-content/freemius/templates/account/partials/addon.php on line 6

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 is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: editor, add content, customize theme, modify template, add slider...

hooked-editable-content/hooked-editable-content.php Passed 13 tests

"Hooked Editable Content" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
111 characters long description:
Create WP or text editors on Edit Post and Edit Page screens for content to be hooked into actions and filters.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin33,270 lines of code in 144 files:
LanguageFilesBlank linesComment linesLines of code
PHP1198,00317,34232,437
JavaScript883117460
Markdown1680214
CSS152317132
JSON10027

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity80.60
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,236
▷ Static methods21016.99%
▷ Public methods86870.23%
▷ Protected methods241.94%
▷ Private methods34427.83%
Functions98
▷ Named functions98100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/hooked-editable-content.png5.02KB2.61KB▼ 47.92%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%