78% heartland-management-terminal

Code Review | Heartland Management Terminal

WordPress plugin Heartland Management Terminal scored78%from 54 tests.

About plugin

  • Plugin page: heartland-managem...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: Oct 17, 2019
  • Number of updates: 9
  • Update frequency: every 106.4 days
  • Top authors: markhagan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲2.05MB] [CPU: ▲11.16ms] Passed 4 tests

A check of server-side resources used by Heartland Management Terminal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.50 ▲2.0452.62 ▲12.58
Dashboard /wp-admin5.37 ▲2.0659.50 ▲1.50
Posts /wp-admin/edit.php5.48 ▲2.1262.14 ▲12.83
Add New Post /wp-admin/post-new.php7.95 ▲2.06104.56 ▲21.92
Media Library /wp-admin/upload.php5.28 ▲2.0550.80 ▲17.71

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Heartland Management Terminal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.29 ▼0.984.92 ▲3.0544.07 ▼4.44
Dashboard /wp-admin2,225 ▲365.85 ▲0.90103.70 ▼26.9582.74 ▲39.58
Posts /wp-admin/edit.php2,126 ▲372.03 ▲0.0240.68 ▲5.1236.52 ▲3.03
Add New Post /wp-admin/post-new.php1,542 ▲2217.80 ▼5.34713.97 ▲61.3465.51 ▲7.43
Media Library /wp-admin/upload.php1,425 ▲404.23 ▲0.0296.98 ▼3.7946.06 ▲0.59

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
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/heartland-management-terminal/templates/admin/notice.php
    • > /wp-content/plugins/heartland-management-terminal/templates/admin/footer.php
  • 133× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HpsCardinalMPIResponse' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Entities/AltPayment/HpsCardinalMPIAddOrderNumberResponse.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsTransaction' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Entities/Check/HpsCheckResponse.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceRewardBuilder.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HpsSoapGatewayService' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Services/Fluent/Gateway/HpsFluentCheckService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsTransaction' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Entities/Gift/HpsGiftCardActivate.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Services/Fluent/Gateway/Credit/HpsCreditServiceGetBuilder.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HpsException' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Infrastructure/HpsProcessorException.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsCardinalMPIResponse' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Entities/AltPayment/HpsCardinalMPILookupResponse.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Services/Fluent/Gateway/Credit/HpsCreditServiceReverseBuilder.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'HpsCardinalMPIResponse' not found in wp-content/plugins/heartland-management-terminal/classes/includes/src/Entities/AltPayment/HpsCardinalMPIVoidResponse.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: systems, tokenize, securesubmit, heartland, gateway...

heartland-management-terminal/heartland-terminal.php 92% from 13 tests

This is the main PHP file of "Heartland Management Terminal" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("heartland-management-terminal.php" instead of "heartland-terminal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin9,998 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PHP2001,8102,8939,535
Markdown31410463

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes184
▷ Abstract classes2111.41%
▷ Concrete classes16388.59%
▷ Final classes00.00%
Methods543
▷ Static methods6612.15%
▷ Public methods37368.69%
▷ Protected methods10920.07%
▷ Private methods6111.23%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants178
▷ Global constants42.25%
▷ Class constants17497.75%
▷ Public constants174100.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
9 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png6.20KB2.92KB▼ 52.81%
templates/admin/assets/ss.png7.18KB4.51KB▼ 37.23%
templates/admin/assets/eventsmanager.png35.32KB15.88KB▼ 55.04%
templates/admin/assets/h.png1.72KB0.34KB▼ 80.32%
templates/admin/assets/faviconpng.png0.11KB0.10KB▼ 7.41%