84% kento-social-share

Code Review | Social Share

WordPress plugin Social Share scored 84% from 54 tests.

About plugin

  • Plugin page: kento-social-share
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Dec 4, 2016
  • Number of updates: 16
  • Update frequency: every 59.3 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 3,910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.48ms] Passed 4 tests

An overview of server-side resources used by Social Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.96 ▲5.58
Dashboard /wp-admin3.31 ▲0.0048.53 ▼7.45
Posts /wp-admin/edit.php3.36 ▲0.0055.30 ▼42.58
Add New Post /wp-admin/post-new.php5.89 ▲0.00113.60 ▲10.57
Media Library /wp-admin/upload.php3.23 ▲0.0045.43 ▲2.55

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Social Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲14913.79 ▼0.6210.18 ▲8.3950.98 ▲6.22
Dashboard /wp-admin2,213 ▲104.88 ▼0.97130.93 ▲20.9342.65 ▼11.60
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0247.34 ▼31.7644.54 ▼40.01
Add New Post /wp-admin/post-new.php1,520 ▼1321.08 ▼2.18730.07 ▲80.2763.54 ▲12.53
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.05106.77 ▼16.1850.54 ▼11.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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)
Even though everything seems fine, this is not 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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/kento-social-share/index.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kento-social-share/index.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Mouse leave effect.), #2 (Mouse hover social icons.), #3 (Normal views.)
You can take inspiration from this readme.txt

kento-social-share/index.php 92% from 13 tests

The main PHP script in "Social Share" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kento-social-share.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin209 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS126129
PHP1441064
JavaScript117016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Constants1
▷ Global constants1100.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
17 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png74.88KB25.86KB▼ 65.47%
screenshot-1.png38.56KB14.60KB▼ 62.12%
css/delicious.png4.12KB1.47KB▼ 64.19%
css/folkd.png4.96KB1.76KB▼ 64.56%
css/dribble.png6.93KB2.48KB▼ 64.29%