93% social-media-share-buttons-and-link-shortener-4eq

Code Review | Social Media Share Buttons and Link Shortener 4eq

WordPress plugin Social Media Share Buttons and Link Shortener 4eq scored 93% from 54 tests.

About plugin

  • Plugin page: social-media-shar...
  • Plugin version: 1.0*/...
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 5.9.2
  • First release: Jan 3, 2020
  • Latest release: Jan 30, 2020
  • Number of updates: 21
  • Update frequency: every 1.3 days
  • Top authors: saeedmoh031 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,385 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Social Media Share Buttons and Link Shortener 4eq
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0160.13 ▼18.86
Dashboard /wp-admin3.41 ▲0.0134.23 ▲0.87
Posts /wp-admin/edit.php3.64 ▲0.0137.59 ▼3.72
Add New Post /wp-admin/post-new.php6.88 ▼0.0889.41 ▼1,185.44
Media Library /wp-admin/upload.php3.30 ▲0.0024.06 ▼3.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Share Buttons and Link Shortener 4eq
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲7915.66 ▲0.505.79 ▼0.123.10 ▲0.91
Dashboard /wp-admin2,898 ▲406.08 ▼0.12116.17 ▼13.90197.58 ▲37.43
Posts /wp-admin/edit.php2,705 ▲113.23 ▼0.0171.10 ▲7.02145.04 ▲3.32
Add New Post /wp-admin/post-new.php1,786 ▲7521.45 ▲0.17450.49 ▲3.65194.68 ▲6.86
Media Library /wp-admin/upload.php1,721 ▲205.53 ▼0.00141.63 ▲0.51241.29 ▲14.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 add_action() in wp-content/plugins/social-media-share-buttons-and-link-shortener-4eq/saeedshare.php:18

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 90% 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
3 plugin tags: share buttons, link shortener, social media

social-media-share-buttons-and-link-shortener-4eq/saeedshare.php 77% from 13 tests

The principal PHP file in "Social Media Share Buttons and Link Shortener 4eq" v. 1.0*/... is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-media-share-buttons-and-link-shortener-4eq.php" instead of "saeedshare.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.0*/...")

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
Everything looks great! No dangerous files found in this plugin148 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS111070
PHP17767
JavaScript12011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png44.48KB30.79KB▼ 30.78%
screenshot-2.png67.32KB34.79KB▼ 48.33%