72% proof-factor-social-proof-notifications-for-woocommerce

Code Review | Proof Factor - Social Proof Notifications for WooCommerce

WordPress plugin Proof Factor - Social Proof Notifications for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: proof-factor-soci...
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2018
  • Latest release: Mar 26, 2019
  • Number of updates: 41
  • Update frequency: every 5.1 days
  • Top authors: prooffactor (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /4,254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼14.98ms] Passed 4 tests

An overview of server-side resources used by Proof Factor - Social Proof Notifications for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0626.80 ▼15.41
Dashboard /wp-admin3.28 ▼0.0231.20 ▼14.08
Posts /wp-admin/edit.php3.35 ▼0.0137.54 ▼8.17
Add New Post /wp-admin/post-new.php5.53 ▼0.3672.95 ▼22.24
Media Library /wp-admin/upload.php3.28 ▲0.0632.25 ▼2.02
Proof Factor Settings /wp-admin/options-general.php?page=proof-factor3.2630.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Proof Factor - Social Proof Notifications for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲5513.93 ▼0.431.97 ▼0.0338.17 ▼8.69
Dashboard /wp-admin2,214 ▲405.56 ▼0.0183.89 ▼12.2939.81 ▼2.96
Posts /wp-admin/edit.php2,126 ▲291.98 ▲0.0136.77 ▼0.8531.59 ▼0.89
Add New Post /wp-admin/post-new.php1,545 ▲1723.14 ▲0.06594.87 ▼18.4371.89 ▲1.40
Media Library /wp-admin/upload.php1,428 ▲284.20 ▲0.0197.15 ▼5.0442.37 ▼2.97
Proof Factor Settings /wp-admin/options-general.php?page=proof-factor8491.9922.3065.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=proof-factor
    • > Notice in wp-content/plugins/proof-factor-social-proof-notifications-for-woocommerce/admin/partials/proof-factor-admin-display.php+95
    Trying to access array offset on value of type bool

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/proof-factor-social-proof-notifications-for-woocommerce/public/partials/proof-factor-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proof-factor-social-proof-notifications-for-woocommerce/admin/partials/proof-factor-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

proof-factor-social-proof-notifications-for-woocommerce/proof-factor.php 85% from 13 tests

"Proof Factor - Social Proof Notifications for WooCommerce" version 1.0.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("proof-factor-social-proof-notifications-for-woocommerce.php" instead of "proof-factor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected640 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12166553512
CSS2174122
JavaScript24546

PHP code Passed 2 tests

A short 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.27
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin