79% wp-social-share-2

Code Review | Social Share Plugin

WordPress plugin Social Share Plugin scored79%from 54 tests.

About plugin

  • Plugin page: wp-social-share-2
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 3, 2017
  • Latest release: Jun 3, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼35.19ms] Passed 4 tests

A check of server-side resources used by Social Share Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.58 ▼6.23
Dashboard /wp-admin2.99 ▼0.3527.58 ▼30.01
Posts /wp-admin/edit.php2.99 ▼0.3625.29 ▼19.29
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.68 ▼79.92
Media Library /wp-admin/upload.php2.99 ▼0.2322.09 ▼11.54

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Social Share Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.59 ▼1.161.81 ▲0.0441.81 ▲1.65
Dashboard /wp-admin2,222 ▲315.85 ▲0.01111.16 ▲1.9840.39 ▼2.65
Posts /wp-admin/edit.php2,105 ▲162.13 ▲0.1640.09 ▲3.9635.02 ▼1.69
Add New Post /wp-admin/post-new.php1,546 ▲1318.27 ▼4.86588.13 ▼61.6774.31 ▲16.73
Media Library /wp-admin/upload.php1,404 ▲224.20 ▼0.0395.66 ▼1.2144.99 ▲4.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > 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.
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: linkedin, share, social, post share, facebook...

wp-social-share-2/main.php 85% from 13 tests

The primary PHP file in "Social Share Plugin" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-social-share-2.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected80 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2232246
CSS15034

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
10 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rss.png15.97KB4.23KB▼ 73.53%
images/star.png1.31KB1.45KB0.00%
images/twitter.png4.78KB2.63KB▼ 45.04%
images/ig.png4.22KB2.56KB▼ 39.37%
images/pin.png4.27KB1.29KB▼ 69.89%