90% shared-counts

Code Review | Shared Counts - Social Media Share Buttons

WordPress plugin Shared Counts - Social Media Share Buttons scored90%from 54 tests.

About plugin

  • Plugin page: shared-counts
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2018
  • Latest release: Dec 20, 2022
  • Number of updates: 23
  • Update frequency: every 77.0 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active /153,685 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.46MB] [CPU: ▼2.56ms] Passed 4 tests

An overview of server-side resources used by Shared Counts - Social Media Share Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4841.05 ▲1.56
Dashboard /wp-admin3.78 ▲0.4454.70 ▼8.28
Posts /wp-admin/edit.php3.89 ▲0.5454.08 ▲10.80
Add New Post /wp-admin/post-new.php6.36 ▲0.47101.77 ▼6.80
Media Library /wp-admin/upload.php3.70 ▲0.4736.76 ▲3.30
Shared Counts /wp-admin/options-general.php?page=shared_counts_options3.6833.58

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
shared_counts_version
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shared Counts - Social Media Share Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.34 ▼1.311.63 ▼0.2942.26 ▲0.82
Dashboard /wp-admin2,247 ▲654.85 ▼1.04111.21 ▲5.9940.02 ▲2.04
Posts /wp-admin/edit.php2,128 ▲391.99 ▼0.0439.73 ▼1.9736.34 ▲0.47
Add New Post /wp-admin/post-new.php6,214 ▲4,68119.28 ▼4.03833.01 ▲229.4551.01 ▼5.90
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.1197.47 ▼0.3742.86 ▼1.01
Shared Counts /wp-admin/options-general.php?page=shared_counts_options1,4131.9133.4235.18

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: facebook, twitter, share counts, social buttons, share buttons...

shared-counts/shared-counts.php Passed 13 tests

The principal PHP file in "Shared Counts - Social Media Share Buttons" v. 1.4.1 is loaded by WordPress automatically on each request
71 characters long description:
Social sharing buttons that look great and keep your site loading fast.

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
Good job! No executable or dangerous file extensions detected15,184 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,430
JavaScript111,1611,5124,346
PHP74858802,195
Sass1619401,063
CSS818747990
Markdown2450140
XML10520

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity78.00
▷ Minimum class complexity3.00
▷ Maximum class complexity153.00
Average method complexity6.58
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods70
▷ Static methods11.43%
▷ Public methods70100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected