84% share-on-social

Code Review | Share on Social

WordPress plugin Share on Social scored84%from 54 tests.

About plugin

  • Plugin page: share-on-social
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7
  • WordPress version: 6.3.1
  • First release: Dec 12, 2014
  • Latest release: Mar 14, 2021
  • Number of updates: 26
  • Update frequency: every 87.9 days
  • Top authors: maithilish (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,665 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.97ms] Passed 4 tests

This is a short check of server-side resources used by Share on Social
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.12 ▼1.97
Dashboard /wp-admin3.37 ▲0.0753.50 ▲0.51
Posts /wp-admin/edit.php3.42 ▲0.0753.35 ▲6.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.61 ▲6.91
Media Library /wp-admin/upload.php3.29 ▲0.0742.77 ▲2.77
Lockers /wp-admin/edit.php?post_type=sos3.3844.13
Statistics /wp-admin/edit.php?post_type=sos&page=sos_stats_page3.2736.68
Settings /wp-admin/edit.php?post_type=sos&page=sos_settings_page3.2633.25
Add New /wp-admin/post-new.php?post_type=sos3.4453.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
sos_common_options
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Share on Social
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.30 ▼0.051.70 ▼0.0246.91 ▲3.78
Dashboard /wp-admin2,217 ▲405.56 ▼0.0892.16 ▼12.6082.16 ▲34.89
Posts /wp-admin/edit.php2,131 ▲341.95 ▼0.0537.35 ▲0.3334.89 ▼2.98
Add New Post /wp-admin/post-new.php1,709 ▲2022.14 ▼1.94662.49 ▲49.8355.20 ▲5.06
Media Library /wp-admin/upload.php1,431 ▲314.12 ▼0.0596.93 ▲0.2276.03 ▲32.30
Lockers /wp-admin/edit.php?post_type=sos1,7401.9735.0934.44
Statistics /wp-admin/edit.php?post_type=sos&page=sos_stats_page1,0745.5045.3248.77
Settings /wp-admin/edit.php?post_type=sos&page=sos_settings_page9182.0424.7125.13
Add New /wp-admin/post-new.php?post_type=sos2,3347.34150.26130.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/share-on-social/admin/class-ajax.php
    • > /wp-content/plugins/share-on-social/frontend/class-frontend.php
    • > /wp-content/plugins/share-on-social/admin/class-sos.php
    • > /wp-content/plugins/share-on-social/include/class-helper.php
    • > /wp-content/plugins/share-on-social/share-on-social.php
    • > /wp-content/plugins/share-on-social/admin/class-stats.php
    • > /wp-content/plugins/share-on-social/admin/class-admin.php
    • > /wp-content/plugins/share-on-social/admin/class-options.php
    • > /wp-content/plugins/share-on-social/admin/class-help.php
    • > /wp-content/plugins/share-on-social/admin/class-activator.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: social network, users wall, traffic, social, facebook...

share-on-social/share-on-social.php 92% from 13 tests

"Share on Social" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,629 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP111858261,356
JavaScript232109250
CSS14023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.44
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods78
▷ Static methods45.13%
▷ Public methods78100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gplus-48.png2.36KB1.32KB▼ 44.10%
images/sos-icon.png0.35KB0.14KB▼ 61.43%
images/fb-48.png0.80KB0.68KB▼ 14.77%