10% happyfox-helpdesk

Code Review | HappyFox Helpdesk

WordPress plugin HappyFox Helpdesk scored10%from 54 tests.

About plugin

  • Plugin page: happyfox-helpdesk
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-3.9
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Aug 3, 2015
  • Number of updates: 21
  • Update frequency: every 21.9 days
  • Top authors: Agent.Logic_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,177 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/happyfox-helpdesk/happyfox.php+1265
    Function create_function() is deprecated

Server metrics [RAM: ▼1.63MB] [CPU: ▼51.35ms] Passed 4 tests

Server-side resources used by HappyFox Helpdesk
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.1011.80 ▼35.73
Dashboard /wp-admin2.38 ▼0.937.11 ▼44.61
Posts /wp-admin/edit.php2.38 ▼0.987.84 ▼40.59
Add New Post /wp-admin/post-new.php2.38 ▼3.518.63 ▼84.46
Media Library /wp-admin/upload.php2.38 ▼0.857.24 ▼31.87

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for HappyFox Helpdesk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19413.29 ▼1.351.90 ▲0.0340.36 ▼5.18
Dashboard /wp-admin2,346 ▲1665.73 ▲0.1195.51 ▲3.8570.50 ▲29.98
Posts /wp-admin/edit.php2,222 ▲1222.13 ▲0.1843.71 ▲5.7735.55 ▼3.39
Add New Post /wp-admin/post-new.php1,795 ▲26722.55 ▼0.41646.32 ▼0.2230.14 ▼21.41
Media Library /wp-admin/upload.php1,515 ▲1154.25 ▲0.05108.83 ▼0.5184.94 ▲38.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/happyfox-helpdesk/happyfox.php+1265
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/happyfox-helpdesk/happyfox.php:13

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Some of the features available in the HappyFox settings page), #2 (Convert a comment into a HappyTicket easily), #3 ('Create a HappyFox Ticket' interface), #4 (The HappyFox tickets widget in your admin area)
The official readme.txt might help

happyfox-helpdesk/happyfox.php 92% from 13 tests

"HappyFox Helpdesk" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("happyfox-helpdesk.php" instead of "happyfox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,981 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP42574111,058
CSS37244415
SVG200293
JavaScript35242215

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.35
Average class complexity77.50
▷ Minimum class complexity45.00
▷ Maximum class complexity110.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods4972.06%
▷ Protected methods00.00%
▷ Private methods1927.94%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
12 PNG files occupy 0.23MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/new-window.png0.45KB0.37KB▼ 18.66%
screenshot-3.png46.89KB17.73KB▼ 62.18%
images/colorbox/loading_background.png0.16KB0.15KB▼ 6.02%
images/colorbox/border.png0.16KB0.16KB0.00%
images/happyfox-32.png1.32KB1.37KB0.00%