67% halloween-woocommerce

Code Review | Haloween Woocommerce

WordPress plugin Haloween Woocommerce scored67%from 54 tests.

About plugin

  • Plugin page: halloween-woocomm...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 17, 2018
  • Latest release: Nov 2, 2018
  • Number of updates: 8
  • Update frequency: every 2.1 days
  • Top authors: wpkraken (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,052 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼10.71ms] Passed 4 tests

An overview of server-side resources used by Haloween Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1228.47 ▼16.81
Dashboard /wp-admin3.47 ▲0.1248.71 ▼16.90
Posts /wp-admin/edit.php3.58 ▲0.2255.60 ▲1.60
Add New Post /wp-admin/post-new.php6.05 ▲0.1697.03 ▼10.71
Media Library /wp-admin/upload.php3.39 ▲0.1641.11 ▲4.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Haloween Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,053 ▲29213.51 ▼1.2110.55 ▲8.8944.51 ▲0.93
Dashboard /wp-admin2,299 ▲1225.67 ▲0.0194.13 ▼6.8975.64 ▲30.94
Posts /wp-admin/edit.php2,223 ▲1231.99 ▲0.0338.86 ▼0.2938.15 ▲5.23
Add New Post /wp-admin/post-new.php1,631 ▲9523.67 ▲0.32637.22 ▼85.7564.11 ▼2.08
Media Library /wp-admin/upload.php1,513 ▲1104.12 ▼0.06103.35 ▲1.4574.21 ▲29.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/halloween-woocommerce/haloween-woocommerce.php+66
    Undefined index: hl_current_pumpkins
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/halloween-woocommerce/partials/wpk-description.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\Admin\\add_filter() in wp-content/plugins/halloween-woocommerce/admin/class.Popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\Admin\\add_action() in wp-content/plugins/halloween-woocommerce/admin/class.WC.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\plugin_dir_url() in wp-content/plugins/halloween-woocommerce/haloween-woocommerce.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\Admin\\add_filter() in wp-content/plugins/halloween-woocommerce/admin/class.Icons.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Halloween\\Admin\\Options' not found in wp-content/plugins/halloween-woocommerce/partials/modal.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\_x() in wp-content/plugins/halloween-woocommerce/partials/notice.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\Admin\\add_filter() in wp-content/plugins/halloween-woocommerce/admin/class.Coupons.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Halloween\\Admin\\is_admin() in wp-content/plugins/halloween-woocommerce/admin/class.Settings.php:15

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 86% 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
These attributes need your attention: Please take inspiration from this readme.txt

halloween-woocommerce/haloween-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "Haloween Woocommerce" version 1.0
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("halloween-woocommerce.php" instead of "haloween-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin5,517 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
SVG518512,495
JavaScript86886051,803
CSS56680639
PHP10202159580

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods50
▷ Static methods1224.00%
▷ Public methods3162.00%
▷ Protected methods00.00%
▷ Private methods1938.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin