72% proof-factor-social-proof-notifications

Code Review | Proof Factor - Social Proof Notifications

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

About plugin

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

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active /3,094 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Proof Factor - Social Proof Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0625.77 ▼8.99
Dashboard /wp-admin3.28 ▼0.0234.05 ▼11.73
Posts /wp-admin/edit.php3.35 ▼0.0138.29 ▼6.29
Add New Post /wp-admin/post-new.php5.52 ▼0.3669.25 ▼21.95
Media Library /wp-admin/upload.php3.28 ▲0.0633.58 ▲2.01
Proof Factor Settings /wp-admin/options-general.php?page=proof-factor-wp3.2629.91

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Proof Factor - Social Proof Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.64 ▲0.271.67 ▼0.1443.34 ▲5.14
Dashboard /wp-admin2,223 ▲435.64 ▲0.0191.68 ▼7.7241.70 ▼1.42
Posts /wp-admin/edit.php2,126 ▲292.00 ▲0.0542.64 ▲4.8333.99 ▲1.36
Add New Post /wp-admin/post-new.php1,546 ▲923.45 ▲5.33666.89 ▲37.4855.45 ▼10.28
Media Library /wp-admin/upload.php1,425 ▲254.16 ▲0.0198.17 ▲2.7142.66 ▼5.53
Proof Factor Settings /wp-admin/options-general.php?page=proof-factor-wp8221.9924.4664.39

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

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

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/proof-factor-social-proof-notifications/public/partials/proof-factor-wp-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 get_option() in wp-content/plugins/proof-factor-social-proof-notifications/admin/partials/proof-factor-wp-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (23 tag instead of maximum 10)
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "Proof Factor - Social Proof Notifications" version 1.0.5
Please take the time to fix the following:
  • 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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("proof-factor-social-proof-notifications.php" instead of "proof-factor-wp.php")

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
Success! There were no dangerous files found in this plugin603 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12163553475
CSS2174122
JavaScript24546

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.77
▷ 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
No PNG images were found in this plugin