83% hfs-controller

Code Review | HFS Controller

WordPress plugin HFS Controller scored83%from 54 tests.

About plugin

  • Plugin page: hfs-controller
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Oct 4, 2013
  • Number of updates: 9
  • Update frequency: every 2.3 days
  • Top authors: indianic (66.67%)tarakpatel (44.44%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /1,920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.71ms] Passed 4 tests

Analyzing server-side resources used by HFS Controller
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.75 ▼5.27
Dashboard /wp-admin3.32 ▲0.0243.71 ▼5.28
Posts /wp-admin/edit.php3.37 ▲0.0245.48 ▼1.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.83 ▼18.66
Media Library /wp-admin/upload.php3.24 ▲0.0233.46 ▼0.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for HFS Controller
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.64 ▼0.721.77 ▼0.3141.24 ▼4.76
Dashboard /wp-admin2,225 ▲344.83 ▼0.9998.32 ▼3.5438.72 ▼1.96
Posts /wp-admin/edit.php2,084 ▼82.02 ▼0.0139.80 ▲0.2835.91 ▲2.25
Add New Post /wp-admin/post-new.php6,284 ▲4,74225.91 ▲7.33826.84 ▲202.2255.23 ▲1.03
Media Library /wp-admin/upload.php1,404 ▲164.18 ▲0.0099.37 ▲3.0641.43 ▼0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/hfs-controller/hfs-controller.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

hfs-controller/hfs-controller.php Passed 13 tests

The main PHP file in "HFS Controller" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
93 characters long description:
A plugin that gives you control over different templates for header, footer and even sidebar.

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
Good job! No executable or dangerous file extensions detected298 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1379298

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png45.39KB22.76KB▼ 49.85%
screenshot-2.png43.20KB21.60KB▼ 50.00%
screenshot-3.png49.16KB24.85KB▼ 49.46%