84% better-hipchat

Code Review | Better HipChat

WordPress plugin Better HipChat scored84%from 54 tests.

About plugin

  • Plugin page: better-hipchat
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: May 7, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: akeda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.21ms] Passed 4 tests

Server-side resources used by Better HipChat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1742.04 ▲2.56
Dashboard /wp-admin3.47 ▲0.1347.17 ▼11.00
Posts /wp-admin/edit.php3.59 ▲0.2348.09 ▲1.50
Add New Post /wp-admin/post-new.php6.05 ▲0.1792.82 ▼3.44
Media Library /wp-admin/upload.php3.40 ▲0.1736.22 ▲0.12
Add New /wp-admin/post-new.php?post_type=hipchat_integration3.4442.20
HipChat Integrations /wp-admin/edit.php?post_type=hipchat_integration3.4438.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Better HipChat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.28 ▼1.072.17 ▲0.3941.75 ▲1.73
Dashboard /wp-admin2,235 ▲445.84 ▲0.9095.32 ▼35.9994.87 ▲54.35
Posts /wp-admin/edit.php2,115 ▲261.99 ▲0.0139.95 ▲2.1540.31 ▲5.45
Add New Post /wp-admin/post-new.php1,537 ▲1823.21 ▲0.17750.30 ▲74.5957.82 ▲5.57
Media Library /wp-admin/upload.php1,414 ▲264.06 ▼0.22105.95 ▼9.1472.87 ▲25.53
Add New /wp-admin/post-new.php?post_type=hipchat_integration1,2742.5747.0064.41
HipChat Integrations /wp-admin/edit.php?post_type=hipchat_integration1,0671.9533.1428.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-hipchat/views/post-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/better-hipchat/views/submit-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/better-hipchat/better-hipchat.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in better-hipchat/assets to your readme.txt
The official readme.txt is a good inspiration

better-hipchat/better-hipchat.php 92% from 13 tests

"Better HipChat" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin1,319 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP13231291924
Bourne Again Shell24138152
Markdown336074
Bourne Shell112647
JavaScript110245
YAML15028
CSS16025
XML13024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.33
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods4195.35%
▷ Protected methods00.00%
▷ Private methods24.65%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png1.56KB0.97KB▼ 37.39%