74% social-referrals

Code Review | Social Referrals

WordPress plugin Social Referrals scored74%from 54 tests.

About plugin

  • Plugin page: social-referrals
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2012
  • Latest release: May 18, 2014
  • Number of updates: 14
  • Update frequency: every 65.4 days
  • Top authors: dkukral (57.14%)Droyal (42.86%)jboydston (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,173 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.06ms] Passed 4 tests

A check of server-side resources used by Social Referrals
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.93 ▼5.38
Dashboard /wp-admin3.33 ▼0.0156.23 ▼7.03
Posts /wp-admin/edit.php3.38 ▲0.0349.28 ▼2.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.92 ▼17.72
Media Library /wp-admin/upload.php3.25 ▲0.0339.28 ▲3.55
Social Referrals /wp-admin/options-general.php?page=social_referrals3.2234.79

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_social_referrals
New WordPress options
widget_recent-comments
social_referrals_db_ver
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Social Referrals
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.20 ▼0.352.00 ▲0.0238.31 ▼6.90
Dashboard /wp-admin2,196 ▲195.56 ▼0.1486.91 ▼5.0638.54 ▼2.85
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0335.08 ▼1.3933.19 ▼2.10
Add New Post /wp-admin/post-new.php1,529 ▼623.41 ▲5.02678.50 ▲22.7561.43 ▼5.99
Media Library /wp-admin/upload.php1,404 ▲104.22 ▼0.0099.49 ▼3.5042.64 ▼1.70
Social Referrals /wp-admin/options-general.php?page=social_referrals8212.0025.6326.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_social_referrals
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • social_referrals_db_ver
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-referrals/social-referrals.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: The official readme.txt might help

social-referrals/social-referrals.php Passed 13 tests

This is the main PHP file of "Social Referrals" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Logs and displays social site referrals

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected144 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12710144

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin