84% logic-hop-woocommerce-add-on

Code Review | Logic Hop WooCommerce Add-on

WordPress plugin Logic Hop WooCommerce Add-on scored84%from 54 tests.

About plugin

  • Plugin page: logic-hop-woocomm...
  • Plugin version: 3.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-5.9
  • WordPress version: 6.3.1
  • First release: Jul 11, 2018
  • Latest release: Feb 15, 2022
  • Number of updates: 16
  • Update frequency: every 82.2 days
  • Top authors: logichop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,087 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: ▲0.01MB] [CPU: ▼2.62ms] Passed 4 tests

Server-side resources used by Logic Hop WooCommerce Add-on
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.31 ▼0.10
Dashboard /wp-admin3.31 ▲0.0143.93 ▼0.07
Posts /wp-admin/edit.php3.36 ▲0.0144.66 ▼4.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.10 ▼6.09
Media Library /wp-admin/upload.php3.24 ▲0.0134.10 ▲3.16

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Logic Hop WooCommerce Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6013.73 ▼0.701.57 ▼0.8938.27 ▼13.82
Dashboard /wp-admin2,223 ▲354.85 ▲0.0197.69 ▼6.0338.33 ▼6.79
Posts /wp-admin/edit.php2,105 ▲162.02 ▼0.0342.27 ▲4.2435.36 ▲1.63
Add New Post /wp-admin/post-new.php1,526 ▼817.37 ▼5.84669.88 ▲23.9560.73 ▲6.33
Media Library /wp-admin/upload.php1,402 ▲114.15 ▼0.0593.93 ▼3.4846.82 ▲3.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/logic-hop-woocommerce-add-on/admin/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: logic hop, personalized content, personalization, woocommerce, personalized marketing

logic-hop-woocommerce-add-on/logichop_woocommerce.php 92% from 13 tests

The main PHP file in "Logic Hop WooCommerce Add-on" ver. 3.0.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("logic-hop-woocommerce-add-on.php" instead of "logichop_woocommerce.php")

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
Success! There were no dangerous files found in this plugin447 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3106191444
JavaScript1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin