10% hfd-epost-integration

Code Review | HFD ePost Integration

WordPress plugin HFD ePost Integration scored10%from 54 tests.

About plugin

  • Plugin page: hfd-epost-integra...
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 12
  • Update frequency: every 40.4 days
  • Top authors: hfdepost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /1,616 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/hfd-epost-integration/class/Shipping/Epost.php+10
    Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/hfd-epost-integration/class/Shipping/Epost.php:10
    Stack trace:
    #0 wp-content/plugins/hfd-epost-integration/class/AutoLoad.php(42): require_once()
    #1 wp-content/plugins/hfd-epost-integration/class/App.php(22): Hfd\Woocommerce\AutoLoad->load()
    #2 [internal function]: Hfd\Woocommerce\App->Hfd\Woocommerce\{closure}()
    #3 wp-content/plugins/hfd-epost-integration/class/Setting.php(40): spl_autoload_call()
    #4 wp-content/plugins/hfd-epost-integration/class/App.php(435): Hfd\Woocommerce\Setting->initDefaultSetting()
    #5 wp-includes/class-wp-hook.php(310): Hfd\Woocommerce\App->pluginActivation()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/includes/plugin.php(693): do_action()
    #9 /var/www/wordpres

Server metrics [RAM: ▼0.01MB] [CPU: ▼1.99ms] Passed 4 tests

This is a short check of server-side resources used by HFD ePost Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.08 ▼4.44
Dashboard /wp-admin3.31 ▼0.0451.85 ▼8.43
Posts /wp-admin/edit.php3.36 ▲0.0048.43 ▲4.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.93 ▲6.36
Media Library /wp-admin/upload.php3.23 ▲0.0032.51 ▲0.08

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

Browser metrics Passed 4 tests

HFD ePost Integration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.23 ▲0.091.86 ▼0.3238.94 ▼4.27
Dashboard /wp-admin2,195 ▲145.64 ▼0.0791.06 ▼11.4038.43 ▼5.20
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0740.94 ▲2.7337.18 ▲2.10
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.20602.41 ▼12.4351.17 ▼3.42
Media Library /wp-admin/upload.php1,397 ▼64.32 ▲0.0396.22 ▼3.1940.61 ▼2.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: spotInfo in wp-content/plugins/hfd-epost-integration/templates/order/pickup.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Hfd\\Woocommerce\\DataObject' not found in wp-content/plugins/hfd-epost-integration/class/Setting.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/hfd-epost-integration/class/Shipping/Home_Delivery.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/hfd-epost-integration/hfd-woocommerce-epost.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Hfd\\Woocommerce\\Template' not found in wp-content/plugins/hfd-epost-integration/class/Order/Pickup.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get() on null in wp-content/plugins/hfd-epost-integration/templates/admin/setting.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Hfd\\Woocommerce\\DataObject' not found in wp-content/plugins/hfd-epost-integration/class/Template.php:9
    • > PHP Notice
      Undefined variable: syncData in wp-content/plugins/hfd-epost-integration/templates/admin/notice.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Hfd\\Woocommerce\\Template' not found in wp-content/plugins/hfd-epost-integration/class/Shipping/Additional.php:12
    • > PHP Notice
      Undefined variable: setting in wp-content/plugins/hfd-epost-integration/templates/admin/setting.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (HFD Settings), #2 (Checkout shipping area), #3 (Checkout map area for local pickup)
Please take inspiration from this readme.txt

hfd-epost-integration/hfd-woocommerce-epost.php 77% from 13 tests

The main PHP script in "HFD ePost Integration" version 1.5.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 195 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hfd-epost-integration.php" instead of "hfd-woocommerce-epost.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected6,013 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript167235533,251
PHP253746452,243
CSS3415289
PO File29578230

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.63
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods137
▷ Static methods42.92%
▷ Public methods12188.32%
▷ Protected methods1611.68%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_sprite.png62.77KB18.27KB▼ 70.89%
css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%