89% cc-social-buttons

Code Review | Premium Contact Buttons

WordPress plugin Premium Contact Buttons scored89%from 54 tests.

About plugin

  • Plugin page: cc-social-buttons
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Dec 22, 2021
  • Number of updates: 5
  • Update frequency: every 193.4 days
  • Top authors: cuongma111 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /664 total downloads


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: ▲1.39MB] [CPU: ▲7.64ms] Passed 4 tests

Analyzing server-side resources used by Premium Contact Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.90 ▲1.4451.66 ▲11.69
Dashboard /wp-admin4.72 ▲1.4257.89 ▲8.27
Posts /wp-admin/edit.php4.77 ▲1.4258.37 ▲10.33
Add New Post /wp-admin/post-new.php7.24 ▲1.35103.47 ▲0.28
Media Library /wp-admin/upload.php4.58 ▲1.3551.30 ▲17.36

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 176 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Premium Contact Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.86 ▼0.547.55 ▲6.0338.00 ▼2.51
Dashboard /wp-admin2,239 ▲655.58 ▲0.0287.40 ▲1.5039.34 ▼4.28
Posts /wp-admin/edit.php2,144 ▲471.95 ▼0.0633.23 ▼5.0137.08 ▲4.67
Add New Post /wp-admin/post-new.php1,568 ▲4218.29 ▼4.76613.33 ▼68.3267.86 ▲8.39
Media Library /wp-admin/upload.php1,441 ▲414.19 ▼0.1294.28 ▼5.3742.70 ▼2.20
List Socials /wp-admin/admin.php?page=cc-social-buttons#tab=list-socials2,8964.74122.9245.64
Setting /wp-admin/admin.php?page=cc-social-buttons#tab=setting2,1634.0063.3036.68

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

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

Smoke tests Passed 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 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
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Screenshot_1.png), #2 (Screenshot_2.png), #3 (Screenshot_3.png), #4 (Screenshot_4.png)
Please take inspiration from this readme.txt

cc-social-buttons/main.php 85% from 13 tests

The entry point to "Premium Contact Buttons" version 1.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cc-social-buttons.php" instead of "main.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 170 characters long)

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 plugin37,552 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PO File203,1983,5916,500

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity25.47
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity6.90
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
▷ Static methods4417.12%
▷ Public methods257100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions26100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.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
7 PNG files occupy 0.27MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/facebook.png17.19KB8.53KB▼ 50.38%
assets/images/skype.png26.95KB14.55KB▼ 46.01%
assets/images/phone.png14.64KB5.15KB▼ 64.82%
assets/images/zalo.png166.19KB82.87KB▼ 50.14%