83% in3-marketing

Code Review | In3 On-site Messaging plug-in for WooCommerce

WordPress plugin In3 On-site Messaging plug-in for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: in3-marketing
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2021
  • Latest release: Sep 7, 2023
  • Number of updates: 11
  • Update frequency: every 84.1 days
  • Top authors: payin3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by In3 On-site Messaging plug-in for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0620.85 ▼21.05
Dashboard /wp-admin3.36 ▲0.0150.09 ▼8.65
Posts /wp-admin/edit.php3.41 ▲0.0644.88 ▼6.34
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.77 ▼18.24
Media Library /wp-admin/upload.php3.28 ▲0.0535.42 ▼0.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
in3_settings
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by In3 On-site Messaging plug-in for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼30614.44 ▲0.220.62 ▼1.5417.08 ▼26.84
Dashboard /wp-admin2,206 ▲184.86 ▼0.02106.80 ▲1.6339.72 ▼4.94
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.59 ▼1.3933.16 ▼3.55
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.13588.74 ▼56.8566.35 ▲14.67
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0494.95 ▼4.2841.46 ▼1.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • in3_settings
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Loader/ArrayLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Logger/AbstractLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Cache' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Cache/AbstractCache.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Loader/StringLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Loader_FilesystemLoader' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Loader/ProductionFilesystemLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Exception/UnknownTemplateException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Logger_AbstractLogger' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Logger/StreamLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Loader/FilesystemLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Loader/InlineLoader.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Cache_AbstractCache' not found in wp-content/plugins/in3-marketing/includes/vendors/Mustache/Cache/NoopCache.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: price

in3-marketing/index.php 77% from 13 tests

The principal PHP file in "In3 On-site Messaging plug-in for WooCommerce" v. 1.0.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("in3-marketing.php" instead of "index.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.9")
  • 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

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 plugin2,955 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP376392,2462,814
PO File14549137
CSS2002
JavaScript2012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.17
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes29
▷ Abstract classes310.34%
▷ Concrete classes2689.66%
▷ Final classes13.85%
Methods209
▷ Static methods62.87%
▷ Public methods15674.64%
▷ Protected methods157.18%
▷ Private methods3818.18%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants64
▷ Global constants00.00%
▷ Class constants64100.00%
▷ Public constants64100.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
PNG images were not found in this plugin