77% eye4fraud-for-woocommerce

Code Review | Eye4fraud for Woocommerce

WordPress plugin Eye4fraud for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: eye4fraud-for-woo...
  • Plugin version: 2.0.19
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2022
  • Latest release: Jan 24, 2023
  • Number of updates: 18
  • Update frequency: every 19.8 days
  • Top authors: judahe4f (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,053 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.46ms] Passed 4 tests

A check of server-side resources used by Eye4fraud for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.33 ▼2.66
Dashboard /wp-admin3.31 ▲0.0050.44 ▼2.94
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼8.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.37 ▼24.04
Media Library /wp-admin/upload.php3.23 ▲0.0037.62 ▲0.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Eye4fraud for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.67 ▲0.161.58 ▼0.5338.89 ▼8.88
Dashboard /wp-admin2,195 ▲185.55 ▼0.1386.22 ▼9.9439.33 ▼11.18
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0233.68 ▼6.5235.55 ▼2.85
Add New Post /wp-admin/post-new.php1,528 ▼822.95 ▼1.95704.60 ▲53.1950.84 ▼15.34
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.03104.63 ▼3.5943.40 ▼2.51

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/eye4fraud-for-woocommerce/eye4fraud-woocommerce.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Admin/Admin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Admin/Column.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Base/Required.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Admin/Page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Services/Cron.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/eye4fraud-for-woocommerce/web/load.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Base/Enqueue.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Eye4fraud\\Base\\BaseController' not found in wp-content/plugins/eye4fraud-for-woocommerce/inc/Base/SettingsLinks.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

eye4fraud-for-woocommerce/eye4fraud-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "Eye4fraud for Woocommerce" version 2.0.19
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eye4fraud-for-woocommerce.php" instead of "eye4fraud-woocommerce.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
There were no executable files found in this plugin32,190 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
CSS32,56821726,122
JavaScript71181413,922
PHP305285821,915
SVG202105
JSON30081
Sass26045

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.24
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods99
▷ Static methods3131.31%
▷ Public methods9797.98%
▷ Protected methods00.00%
▷ Private methods22.02%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/woologo.png6.20KB5.75KB▼ 7.17%
assets/images/Chain.png14.72KB8.82KB▼ 40.05%
assets/images/woolo.png4.44KB4.11KB▼ 7.28%
assets/images/plus.png2.20KB2.04KB▼ 7.18%
assets/images/logo-shopify.png6.61KB3.68KB▼ 44.37%