78% prosocial

Code Review | ProSocial

WordPress plugin ProSocial scored78%from 54 tests.

About plugin

  • Plugin page: prosocial
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-2.9
  • WordPress version: 6.3.1
  • First release: Jun 6, 2012
  • Latest release: Jun 6, 2012
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: andeggs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.22MB] [CPU: ▼13.60ms] Passed 4 tests

An overview of server-side resources used by ProSocial
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.0844.68 ▼3.46
Dashboard /wp-admin3.74 ▲0.1755.78 ▼1.17
Posts /wp-admin/edit.php3.79 ▲0.1149.57 ▼3.05
Add New Post /wp-admin/post-new.php4.96 ▼1.1852.57 ▼45.54
Media Library /wp-admin/upload.php3.60 ▲0.1138.67 ▼2.36
ProSocial /wp-admin/options-general.php?page=prosocial3.5432.65

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for ProSocial
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12213.88 ▼0.709.27 ▲7.4242.44 ▼0.33
Dashboard /wp-admin2,202 ▲225.60 ▲0.0483.43 ▼19.9538.26 ▼3.51
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0134.64 ▼2.5333.19 ▼1.20
Add New Post /wp-admin/post-new.php1,550 ▲2423.37 ▲5.80596.03 ▼129.8746.90 ▼12.42
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.0898.36 ▼8.8645.32 ▼2.37
ProSocial /wp-admin/options-general.php?page=prosocial1,1792.0625.9182.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=prosocial
    • > Notice in wp-content/plugins/prosocial/prosocial.php+174
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/prosocial/prosocial.php:16

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === prosocial === )
  • Screenshots: Add images for these screenshots: #1 (When the user hovers over the blog post author's name, ProSocial shows a pop-up bar with links to their social media accounts.), #2 (Your blog authors can update their social media accounts in the standard 'Contact info' section of their WordPress user profile.), #3 (The administrator can decide which social media accounts are shown, as well as other options.)
The official readme.txt might help

prosocial/prosocial.php Passed 13 tests

"ProSocial" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Plugin for displaying social media accounts next to authors' names

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected521 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP292121374
CSS114481
JavaScript1443566

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
48 PNG files occupy 0.21MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/gowalla.png0.55KB0.47KB▼ 14.74%
img/etsy.png0.53KB0.47KB▼ 10.58%
img/evernote.png0.52KB0.35KB▼ 32.08%
img/friendfeed.png0.72KB0.63KB▼ 11.73%
img/reddit.png0.73KB0.54KB▼ 25.13%