83% seo-optimized-share-buttons

Code Review | Social Share Buttons

WordPress plugin Social Share Buttons scored83%from 54 tests.

About plugin

  • Plugin page: seo-optimized-sha...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 19, 2016
  • Latest release: Dec 19, 2016
  • Number of updates: 44
  • Update frequency: every 2.9 days
  • Top authors: spyrosli (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /8,323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Social Share Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.26 ▼4.55
Dashboard /wp-admin3.34 ▲0.0347.94 ▼10.18
Posts /wp-admin/edit.php3.45 ▲0.0950.56 ▼1.14
Add New Post /wp-admin/post-new.php5.97 ▲0.081,313.00 ▲1,213.57
Media Library /wp-admin/upload.php3.26 ▲0.0339.72 ▼0.11

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
apss_social_counts_transients
widget_recent-comments
apss_share_settings
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Social Share Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.66 ▼0.738.83 ▲7.1340.31 ▼3.40
Dashboard /wp-admin2,210 ▲365.51 ▼0.0286.04 ▼24.7771.11 ▲24.73
Posts /wp-admin/edit.php2,118 ▲181.99 ▲0.0137.02 ▼6.1235.43 ▼3.48
Add New Post /wp-admin/post-new.php1,552 ▲2622.87 ▼0.38748.38 ▲51.0855.51 ▼9.42
Media Library /wp-admin/upload.php1,415 ▲184.20 ▲0.08101.51 ▼1.0575.20 ▲28.37

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
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • apss_social_counts_transients
    • theysaidso_admin_options
    • apss_share_settings
    • can_compress_scripts
    • db_upgraded

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
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 items
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/seo-optimized-share-buttons/simple-social-share-buttons.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/frontend/shortcode.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/backend/how-to-use.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/backend/main-page.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/backend/save-settings.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/frontend/count_shortcode.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/backend/activation.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/backend/about-apss.php
    • > /wp-content/plugins/seo-optimized-share-buttons/inc/frontend/content-filter.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: social, social share buttons, share, share buttons, buttons

seo-optimized-share-buttons/simple-social-share-buttons.php 77% from 13 tests

The main PHP script in "Social Share Buttons" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("seo-optimized-share-buttons.php" instead of "simple-social-share-buttons.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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
No dangerous file extensions were detected2,279 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP101951341,563
SVG100504
PO File16887168
JavaScript27342
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity129.00
▷ Minimum class complexity129.00
▷ Maximum class complexity129.00
Average method complexity5.27
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
8 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/google-plus-blue.png1.85KB0.79KB▼ 57.25%
images/left-arrow.png1.02KB0.19KB▼ 81.82%
images/arrow.png1.02KB0.18KB▼ 82.55%
images/demo-btn.png1.74KB0.78KB▼ 55.14%
images/flickr.png1.18KB0.29KB▼ 75.89%