78% hq60-fidelity-card

Code Review | HQ60 Fidelity Card

WordPress plugin HQ60 Fidelity Card scored78%from 54 tests.

About plugin

  • Plugin page: hq60-fidelity-card
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 12, 2018
  • Latest release: Feb 8, 2018
  • Number of updates: 22
  • Update frequency: every 1.3 days
  • Top authors: tresrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▲1.92ms] Passed 4 tests

A check of server-side resources used by HQ60 Fidelity Card
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1745.34 ▲2.12
Dashboard /wp-admin3.61 ▲0.3155.33 ▲5.13
Posts /wp-admin/edit.php3.67 ▲0.3152.95 ▼0.58
Add New Post /wp-admin/post-new.php6.13 ▲0.2492.12 ▲1.02
Media Library /wp-admin/upload.php3.48 ▲0.2543.32 ▲8.47
HQ60 - Registrazioni non confermate /wp-admin/edit.php?post_type=hq60_temp_reg_cp3.5242.50
HQ60 - Shortcode list /wp-admin/admin.php?page=hq60-fidelity-card-shortcode3.4534.77
HQ60 /wp-admin/admin.php?page=hq60-fidelity-card3.4537.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HQ60 Fidelity Card
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.26 ▼1.101.98 ▲0.0844.30 ▲2.99
Dashboard /wp-admin2,229 ▲414.88 ▼0.01103.16 ▼1.6038.48 ▼3.42
Posts /wp-admin/edit.php2,115 ▲232.04 ▲0.0535.72 ▼8.9234.32 ▼4.77
Add New Post /wp-admin/post-new.php1,537 ▲2317.56 ▼0.08679.44 ▼28.9861.46 ▲0.56
Media Library /wp-admin/upload.php1,417 ▲294.20 ▲0.06102.60 ▼15.0642.28 ▼9.00
HQ60 - Registrazioni non confermate /wp-admin/edit.php?post_type=hq60_temp_reg_cp1,0681.9431.8630.61
HQ60 - Shortcode list /wp-admin/admin.php?page=hq60-fidelity-card-shortcode8762.0325.3326.52
HQ60 /wp-admin/admin.php?page=hq60-fidelity-card8192.0624.8428.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hq60-fidelity-card/views/email/email-temp-password-registration.php
    • > /wp-content/plugins/hq60-fidelity-card/views/email/email-temp-registration-confirm.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hq60-fidelity-card/views/frontend/user-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Hq60fidelitycard\\Admin\\AdminMenu' not found in wp-content/plugins/hq60-fidelity-card/src/Hq60fidelitycard/Admin/Admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hq60-fidelity-card/views/frontend/user-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hq60-fidelity-card/views/admin/settings-generic.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hq60-fidelity-card/views/frontend/form/user-register.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hq60-fidelity-card/views/frontend/user-manage-password.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Hq60fidelitycard\\Base' not found in wp-content/plugins/hq60-fidelity-card/src/Hq60fidelitycard/Database/Database.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hq60-fidelity-card/views/admin/shortcode-list.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Hq60fidelitycard\\Base' not found in wp-content/plugins/hq60-fidelity-card/src/Hq60fidelitycard/Frontend/Frontend.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hq60-fidelity-card/views/frontend/user-data.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: The plugin tags were not defined
The official readme.txt might help

hq60-fidelity-card/hq60fidelitycard.php 92% from 13 tests

The primary PHP file in "HQ60 Fidelity Card" version 1.8 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hq60-fidelity-card.php" instead of "hq60fidelitycard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,588 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,9281,4032,568
CSS20220

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.00
▷ Minimum class complexity3.00
▷ Maximum class complexity93.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods111
▷ Static methods00.00%
▷ Public methods5045.05%
▷ Protected methods2825.23%
▷ Private methods3329.73%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin