83% innercircle-ambassadors-ugc-for-woocommerce

Code Review | Innercircle: Social & Reviews

WordPress plugin Innercircle: Social & Reviews scored 83% from 54 tests.

About plugin

  • Plugin page: innercircle-ambas...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.9.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2021
  • Latest release: Oct 27, 2022
  • Number of updates: 52
  • Update frequency: every 6.4 days
  • Top authors: innercircleteam (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active / 2,943 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.00MB] [CPU: ▼1.18ms] Passed 4 tests

This is a short check of server-side resources used by Innercircle: Social & Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.85 ▼6.12
Dashboard /wp-admin3.31 ▲0.0050.56 ▲2.14
Posts /wp-admin/edit.php3.36 ▲0.0047.93 ▲8.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.17 ▼3.45
Media Library /wp-admin/upload.php3.23 ▲0.0036.73 ▲2.72

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Innercircle: Social & Reviews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.34 ▼0.041.64 ▼0.1742.84 ▼9.93
Dashboard /wp-admin2,203 ▲155.83 ▲0.9398.46 ▼16.1040.07 ▼2.15
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0240.28 ▲4.3036.06 ▼1.23
Add New Post /wp-admin/post-new.php1,533 ▲423.12 ▲5.07583.84 ▼31.7861.05 ▲5.49
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0199.03 ▼0.9242.59 ▼2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'INNERCIRCLE_BASE_PATH./../includes/InnerCircle_HTTP.php' (include_path='.:/usr/share/php') in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/includes/InnerCircle_Uninstall.php on line 3
    • > PHP Warning
      require_once(INNERCIRCLE_BASE_PATH./../includes/InnerCircle_HTTP.php): failed to open stream: No such file or directory in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/includes/InnerCircle_Uninstall.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/templates/page-innercircle-platform.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'INNERCIRCLE_BASE_PATH./../includes/InnerCircle_Uninstall.php' (include_path='.:/usr/share/php') in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/admin/class-ic-deactivate.php on line 5
    • > PHP Warning
      Use of undefined constant INNERCIRCLE_BASE_PATH - assumed 'INNERCIRCLE_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/includes/InnerCircle_Uninstall.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Innercircle\\Core\\Assets_Interface' not found in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/templates/util/class-js-loader.php:9
    • > PHP Warning
      require_once(INNERCIRCLE_BASE_PATH./../includes/InnerCircle_Uninstall.php): failed to open stream: No such file or directory in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/admin/class-ic-deactivate.php on line 5
    • > PHP Warning
      require_once(INNERCIRCLE_BASE_PATH./../includes/InnerCircle_HTTP.php): failed to open stream: No such file or directory in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/admin/class-ic-webhooks.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'INNERCIRCLE_BASE_PATH./../includes/InnerCircle_HTTP.php' (include_path='.:/usr/share/php') in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/admin/class-ic-webhooks.php on line 6
    • > PHP Warning
      Use of undefined constant INNERCIRCLE_BASE_PATH - assumed 'INNERCIRCLE_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/innercircle-ambassadors-ugc-for-woocommerce/src/admin/class-ic-webhooks.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
You can look at the official readme.txt

innercircle-ambassadors-ugc-for-woocommerce/innercircle.php 85% from 13 tests

The main PHP script in "Innercircle: Social & Reviews" version 2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("innercircle-ambassadors-ugc-for-woocommerce.php" instead of "innercircle.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

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
There were no executable files found in this plugin12,045 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JSON50010,062
PHP333415511,664
CSS200162
JavaScript48080
XML10077

PHP code Passed 2 tests

This is a short overview 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.39
Average class complexity9.24
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces11
Interfaces1
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods111
▷ Static methods3329.73%
▷ Public methods9787.39%
▷ Protected methods00.00%
▷ Private methods1412.61%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants20
▷ Global constants210.00%
▷ Class constants1890.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected