83% cresta-social-share-counter

Code Review | Cresta Social Share Counter

WordPress plugin Cresta Social Share Counter scored83%from 54 tests.

About plugin

  • Plugin page: cresta-social-sha...
  • Plugin version: 2.9.9.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Nov 3, 2023
  • Number of updates: 273
  • Update frequency: every 12.4 days
  • Top authors: CrestaProject (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

4,000+ active /369,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼7.70ms] Passed 4 tests

Server-side resources used by Cresta Social Share Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2841.29 ▲0.88
Dashboard /wp-admin3.66 ▲0.3251.44 ▼10.14
Posts /wp-admin/edit.php3.78 ▲0.4245.42 ▼0.87
Add New Post /wp-admin/post-new.php6.25 ▲0.3683.65 ▼20.66
Media Library /wp-admin/upload.php3.61 ▲0.3836.52 ▲3.68

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 42 new options
New WordPress options
cresta_social_shares_float
cresta_social_shares_disable_mobile
cresta_social_shares_linkedin_alternative_count
cresta_social_shares_enable_animation
cresta_social_shares_enable_shadow
selected_button
cresta_social_shares_selected_page
cresta_social_shares_google_font
cresta_social_shares_position_left
cresta_social_shares_twitter_new_logo
...

Browser metrics Passed 4 tests

An overview of browser requirements for Cresta Social Share Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.32 ▼0.031.78 ▲0.0242.21 ▼1.88
Dashboard /wp-admin2,210 ▲415.62 ▲0.0698.25 ▲1.0841.38 ▼0.69
Posts /wp-admin/edit.php2,112 ▲121.94 ▼0.0737.24 ▼0.8833.77 ▲0.58
Add New Post /wp-admin/post-new.php6,234 ▲4,70818.97 ▼4.25883.99 ▲235.1356.46 ▲5.13
Media Library /wp-admin/upload.php1,412 ▲124.20 ▲0.0098.32 ▲2.5040.58 ▼3.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • cresta_social_shares_linkedin_alternative_count
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cresta-social-share-counter/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (28 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (Cresta Social Share Counter Settings Page 1), #2 (Cresta Social Share Counter Settings Page 2), #3 (Floating social buttons with social count), #4 (Social buttons before/after posts/page content)
The official readme.txt is a good inspiration

cresta-social-share-counter/cresta-social-share-counter.php 92% from 13 tests

The entry point to "Cresta Social Share Counter" version 2.9.9.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,661 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP690311,453
CSS71339707
JavaScript6616348
PO File14042109
SVG218139
XML1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.00
▷ Minimum class complexity14.00
▷ Maximum class complexity20.00
Average method complexity17.00
▷ Minimum method complexity14.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
19 compressed PNG files occupy 0.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cresta-social-share-counter-style-17.png0.32KB0.33KB0.00%
images/cresta-social-share-counter-style-5.png1.29KB1.30KB0.00%
images/by-cr-social.png0.21KB0.21KB0.00%
images/no-image-found.png2.40KB2.01KB▼ 16.30%
images/cresta-social-share-counter-style-4.png0.53KB0.54KB0.00%