93% advance-social-sharer

Code Review | Advance Social Sharer

WordPress plugin Advance Social Sharer scored 93% from 54 tests.

About plugin

  • Plugin page: advance-social-sh...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 5.9.2
  • First release: Mar 18, 2013
  • Latest release: May 11, 2017
  • Number of updates: 54
  • Update frequency: every 30.0 days
  • Top authors: pankaj.sakaria (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 9,494 total downloads

Benchmarks

Plugin footprint Passed 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.26MB] [CPU: ▼315.16ms] Passed 4 tests

This is a short check of server-side resources used by Advance Social Sharer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0443.97 ▼3.43
Dashboard /wp-admin3.50 ▲0.1032.39 ▼0.78
Posts /wp-admin/edit.php3.73 ▲0.0941.17 ▲5.67
Add New Post /wp-admin/post-new.php5.73 ▼1.2458.94 ▼1,246.51
Media Library /wp-admin/upload.php3.38 ▲0.0823.17 ▼9.90

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advance Social Sharer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲4315.89 ▲0.205.51 ▼0.322.14 ▼0.78
Dashboard /wp-admin2,913 ▲526.02 ▼0.11116.28 ▼21.43177.22 ▲18.95
Posts /wp-admin/edit.php2,709 ▲183.26 ▲0.0265.75 ▲3.92135.17 ▼7.69
Add New Post /wp-admin/post-new.php1,683 ▼9018.89 ▼2.20403.43 ▼33.70182.68 ▲27.45
Media Library /wp-admin/upload.php1,717 ▲195.53 ▲0.08123.26 ▼18.95198.83 ▲9.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at 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/advance-social-sharer/advance-social-sharer.php:615

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === advance-social-sharer === )
You can look at the official readme.txt

advance-social-sharer/advance-social-sharer.php Passed 13 tests

This is the main PHP file of "Advance Social Sharer" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
Add Social buttons in to your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin536 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29352496
CSS12040

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.36MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png101.83KB55.20KB▼ 45.79%
images/icon_small.png0.84KB0.98KB0.00%
images/icon.png2.46KB1.76KB▼ 28.45%
screenshot-2.png32.90KB14.42KB▼ 56.16%
screenshot-4.png102.55KB55.74KB▼ 45.65%