84% pantheon-hud

Code Review | Pantheon HUD

WordPress plugin Pantheon HUD scored 84% from 54 tests.

About plugin

  • Plugin page: pantheon-hud
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Apr 7, 2023
  • Number of updates: 33
  • Update frequency: every 80.0 days
  • Top authors: danielbachhuber (90.91%)getpantheon (12.12%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 35,693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.51ms] Passed 4 tests

An overview of server-side resources used by Pantheon HUD
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.86 ▼6.39
Dashboard /wp-admin3.38 ▲0.0846.22 ▲0.45
Posts /wp-admin/edit.php3.43 ▲0.0848.28 ▼2.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.90 ▼13.10
Media Library /wp-admin/upload.php3.30 ▲0.0736.40 ▲1.28

Server storage [IO: ▲0.09MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pantheon HUD
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲12513.29 ▼1.081.61 ▼0.1738.88 ▼3.67
Dashboard /wp-admin2,251 ▲635.87 ▲1.0298.15 ▼6.8379.22 ▲35.25
Posts /wp-admin/edit.php2,137 ▲481.98 ▼0.0638.01 ▼3.5834.29 ▼3.15
Add New Post /wp-admin/post-new.php1,555 ▲3518.27 ▼4.92736.00 ▲72.7970.51 ▲13.78
Media Library /wp-admin/upload.php1,427 ▲394.14 ▼0.26106.79 ▼10.1870.95 ▲20.84

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pantheon-hud/pantheon-hud.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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 your attention:
  • Screenshots: Screenshot #1 (Pantheon HUD is present in the WordPress toolbar. On hover, it displays environmental details and helpful links.) image not found
You can take inspiration from this readme.txt

pantheon-hud/pantheon-hud.php 92% from 13 tests

The main file in "Pantheon HUD" v. 0.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected327 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP339132326
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.50
▷ Minimum class complexity21.00
▷ Maximum class complexity22.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.18KB17.16KB▼ 70.00%