73% social-shares

Code Review | Social Shares

WordPress plugin Social Shares scored73%from 54 tests.

About plugin

  • Plugin page: social-shares
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Jun 21, 2014
  • Latest release: Nov 10, 2015
  • Number of updates: 26
  • Update frequency: every 19.6 days
  • Top authors: Waterloo Plugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,493 total downloads

Benchmarks

Plugin footprint 65% 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.91MB] [CPU: ▼31.52ms] Passed 4 tests

A check of server-side resources used by Social Shares
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.89 ▼1.96
Dashboard /wp-admin3.04 ▼0.3022.89 ▼37.12
Posts /wp-admin/edit.php3.05 ▼0.3124.41 ▼20.13
Add New Post /wp-admin/post-new.php3.04 ▼2.8423.36 ▼59.43
Media Library /wp-admin/upload.php3.04 ▼0.1822.68 ▼9.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
social_shares
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Social Shares
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▲0.011.87 ▲0.0644.05 ▼2.86
Dashboard /wp-admin2,196 ▲195.56 ▼0.0992.32 ▼0.6939.12 ▼3.34
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0234.77 ▼3.1333.27 ▼1.42
Add New Post /wp-admin/post-new.php1,529 ▲323.70 ▲0.13655.70 ▼32.9952.41 ▼2.87
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.1294.92 ▼16.5143.99 ▼2.84
Social Shares /wp-admin/social_shares.php260.420.0814.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • social_shares
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/social_shares.php
    • > Network (severe)
    wp-admin/social_shares.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% 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:
  • Screenshots: Screenshot #1 (Options page.) image missing
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

social-shares/social_shares.php 85% from 13 tests

The entry point to "Social Shares" version 1.1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-shares.php" instead of "social_shares.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

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
No dangerous file extensions were detected272 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25012272

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected