67% clean-social-icons

Code Review | Clean Social Icons

WordPress plugin Clean Social Icons scored 67% from 54 tests.

About plugin

  • Plugin page: clean-social-icons
  • Plugin version: 0.9.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 5.9.2
  • First release: Aug 26, 2020
  • Latest release: Aug 27, 2020
  • Number of updates: 13
  • Update frequency: every 1.0 days
  • Top authors: meeplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 966 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲6.86MB] [CPU: ▼272.37ms] 50% from 4 tests

Server-side resources used by Clean Social Icons
The following require your attention
  • RAM: Total memory usage must be kept under 10MB (currently 10.48MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.86MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.19 ▲6.6785.22 ▲36.02
Dashboard /wp-admin10.37 ▲6.9672.57 ▲37.80
Posts /wp-admin/edit.php10.59 ▲6.9574.89 ▲35.90
Add New Post /wp-admin/post-new.php13.84 ▲6.87129.90 ▼1,198.02
Media Library /wp-admin/upload.php10.26 ▲6.9660.99 ▲36.64
Freemius Debug [v.2.4.0.1] /wp-admin/admin.php?page=freemius10.4861.82

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 439 new files
Database: no new tables, 5 new options
New WordPress options
fs_accounts
fs_active_plugins
fs_gdpr
acf_version
fs_debug_mode

Browser metrics Passed 4 tests

An overview of browser requirements for Clean Social Icons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,994 ▲25017.54 ▲1.489.59 ▲3.562.28 ▼0.18
Dashboard /wp-admin3,010 ▲1597.76 ▲1.60135.19 ▼3.58174.61 ▲8.96
Posts /wp-admin/edit.php2,808 ▲1144.26 ▲1.0394.65 ▲30.33158.21 ▲13.56
Add New Post /wp-admin/post-new.php1,677 ▲1621.95 ▲6.43452.22 ▲18.06167.45 ▲14.65
Media Library /wp-admin/upload.php1,827 ▲1296.03 ▲0.49143.65 ▲5.60204.85 ▲20.39
Freemius Debug [v.2.4.0.1] /wp-admin/admin.php?page=freemius1,5263.6169.26112.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/clean-social-icons/freemius/includes/class-freemius.php+8536
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • fs_debug_mode
    • fs_accounts
    • acf_version
    • fs_gdpr
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/clean-social-icons/freemius/templates/ajax-loader.php
  • 87× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/clean-social-icons/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clean-social-icons/vendor/acf/includes/upgrades.php:450
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/clean-social-icons/vendor/acf/includes/fields/class-acf-field-link.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_get_location_rule_types() in wp-content/plugins/clean-social-icons/vendor/acf/includes/admin/views/html-location-rule.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/clean-social-icons/vendor/acf/includes/admin/views/html-admin-page-upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/clean-social-icons/vendor/acf/includes/fields/class-acf-field-textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/clean-social-icons/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/clean-social-icons/vendor/acf/includes/admin/views/field-group-field.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/clean-social-icons/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/clean-social-icons/vendor/acf/includes/admin/views/html-admin-page-upgrade-network.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in clean-social-icons/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

clean-social-icons/clean-social-icons.php Passed 13 tests

The main PHP file in "Clean Social Icons" ver. 0.9.11 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
Adds clean and elegant social icons to your website

Code Analysis 97% from 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
There were no executable files found in this plugin132,579 lines of code in 331 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123,34238,61549,060
PHP25217,85833,95246,687
JavaScript176,7446,70122,481
SVG418129,329
CSS261,727884,898
JSON100124

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,885)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity33.84
▷ Minimum class complexity1.00
▷ Maximum class complexity2,885.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes156
▷ Abstract classes21.28%
▷ Concrete classes15498.72%
▷ Final classes00.00%
Methods1,813
▷ Static methods1769.71%
▷ Public methods1,46680.86%
▷ Protected methods150.83%
▷ Private methods33218.31%
Functions517
▷ Named functions517100.00%
▷ Anonymous functions00.00%
Constants138
▷ Global constants11381.88%
▷ Class constants2518.12%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/acf/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%
vendor/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/acf/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%
vendor/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%