78% social-payments

Code Review | Social Payments

WordPress plugin Social Payments scored78%from 54 tests.

About plugin

  • Plugin page: social-payments
  • Plugin version: 1.7.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Aug 23, 2016
  • Number of updates: 7
  • Update frequency: every 70.4 days
  • Top authors: butterflymedia (85.71%)nosaint (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Social Payments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.91 ▲0.67
Dashboard /wp-admin3.34 ▼0.0149.03 ▼15.10
Posts /wp-admin/edit.php3.39 ▲0.0347.53 ▼1.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.54 ▼16.40
Media Library /wp-admin/upload.php3.26 ▲0.0340.06 ▼5.76
Social Payments /wp-admin/options-general.php?page=sp_options3.2032.12

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
sp_tweet
sp_tweet_via
widget_recent-posts
theysaidso_admin_options
db_upgraded
sp_google
sp_tweet_related
sp_t
sp_f
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Payments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.25 ▼0.894.88 ▲2.7944.07 ▼1.68
Dashboard /wp-admin2,216 ▲284.85 ▼0.01113.13 ▲8.9544.09 ▲3.77
Posts /wp-admin/edit.php2,099 ▲102.04 ▲0.0634.75 ▼3.1636.89 ▲0.29
Add New Post /wp-admin/post-new.php1,538 ▼418.29 ▲0.24644.22 ▼18.1056.78 ▲5.64
Media Library /wp-admin/upload.php1,398 ▲134.29 ▲0.0899.47 ▼15.0447.42 ▼0.40
Social Payments /wp-admin/options-general.php?page=sp_options9892.0327.7846.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 15 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • sp_facebook
    • sp_g
    • sp_t
    • can_compress_scripts
    • sp_tweet_via
    • sp_f
    • db_upgraded
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sp_options
    • > Notice in wp-content/plugins/social-payments/social-payments.php+198
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-payments/social-payments.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/social-payments/social-payments.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No tags were found

social-payments/social-payments.php 92% from 13 tests

This is the main PHP file of "Social Payments" version 1.7.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 235 characters long)

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 detected239 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13419176
CSS31063

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/gb-logo-white-512.png14.72KB8.49KB▼ 42.32%