68% useinfluence

Code Review | Useinfluence

WordPress plugin Useinfluence scored68%from 54 tests.

About plugin

  • Plugin page: useinfluence
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2018
  • Latest release: May 20, 2020
  • Number of updates: 49
  • Update frequency: every 12.9 days
  • Top authors: devilla (71.43%)ramanparashar (30.61%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,912 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.28ms] Passed 4 tests

Server-side resources used by Useinfluence
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.06 ▼2.61
Dashboard /wp-admin3.37 ▲0.0648.51 ▼4.24
Posts /wp-admin/edit.php3.48 ▲0.1247.22 ▼11.65
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.29 ▼9.42
Media Library /wp-admin/upload.php3.29 ▲0.0636.86 ▼3.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 33 new files
Database: 1 new table, 6 new options
New tables
tracking_id
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Useinfluence
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲15713.64 ▼0.747.25 ▲5.0642.88 ▼2.18
Dashboard /wp-admin2,210 ▲225.88 ▲0.0399.17 ▼10.4788.52 ▲42.50
Posts /wp-admin/edit.php2,108 ▲192.00 ▲0.0340.77 ▼2.2736.99 ▼3.37
Add New Post /wp-admin/post-new.php1,545 ▲1718.24 ▼5.02726.12 ▼18.3973.48 ▲5.43
Media Library /wp-admin/upload.php1,404 ▲134.21 ▲0.04108.83 ▼6.6774.79 ▲24.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • tracking_id
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/useinfluence/admin/partials/useinfluence-admin-display.php
    • > /wp-content/plugins/useinfluence/public/partials/useinfluence-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/useinfluence/includes/useinfluence_send_wooco_data.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: promotion, marketing, social proof, notifications, woocommerce...

useinfluence/index.php 92% from 13 tests

The main PHP file in "Useinfluence" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("useinfluence.php" instead of "index.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
Good job! No executable or dangerous file extensions detected452 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14150558358
Markdown159088
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.64MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/recent_latest_8Feb.png130.33KB45.68KB▼ 64.95%
assets/live viewer3.png36.86KB16.72KB▼ 54.65%
assets/group activity.png31.79KB16.21KB▼ 49.01%
assets/Influence-trackingId.png107.09KB38.88KB▼ 63.70%
assets/plg-icon.png1.21KB0.42KB▼ 64.91%