90% easy-social-share-buttons

Code Review | Easy Social Share Buttons

WordPress plugin Easy Social Share Buttons scored 90% from 54 tests.

About plugin

  • Plugin page: easy-social-share...
  • Plugin version: 1.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Feb 5, 2018
  • Number of updates: 25
  • Update frequency: every 40.2 days
  • Top authors: brianbrey (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active / 73,185 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.04MB] [CPU: ▼5.24ms] Passed 4 tests

An overview of server-side resources used by Easy Social Share Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.42 ▲2.50
Dashboard /wp-admin3.34 ▲0.0446.32 ▼0.70
Posts /wp-admin/edit.php3.39 ▲0.0444.53 ▼0.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.53 ▼14.77
Media Library /wp-admin/upload.php3.27 ▲0.0433.42 ▼5.31
Easy Social Share /wp-admin/options-general.php?page=easy_social_share_buttons_settings3.2431.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
easy_social_share_buttons_version
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Social Share Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.23 ▼1.072.23 ▲0.7642.04 ▲5.39
Dashboard /wp-admin2,210 ▲195.79 ▼0.0793.82 ▼8.3836.97 ▼6.92
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0336.03 ▼0.8534.64 ▲4.16
Add New Post /wp-admin/post-new.php1,545 ▲3118.38 ▲0.78616.93 ▼65.5345.18 ▼3.30
Media Library /wp-admin/upload.php1,392 ▲14.23 ▼0.0393.83 ▼5.1241.23 ▼5.72
Easy Social Share /wp-admin/options-general.php?page=easy_social_share_buttons_settings1,0782.1923.3931.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • easy_social_share_buttons_version
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: plugin, social sharing, wordpress

easy-social-share-buttons/easy-social-share-buttons.php 92% from 13 tests

The primary PHP file in "Easy Social Share Buttons" version 1.4.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.9" instead of "4.0")

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
Everything looks great! No dangerous files found in this plugin1,375 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6314406898
Sass1226147
CSS2220138
PO File13844106
JavaScript218886

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity46.00
▷ Minimum class complexity23.00
▷ Maximum class complexity63.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3075.00%
▷ Protected methods00.00%
▷ Private methods1025.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected