84% custom-social-media-icons

Code Review | Custom Social Media Icons

WordPress plugin Custom Social Media Icons scored 84% from 54 tests.

About plugin

  • Plugin page: custom-social-med...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.9.2
  • First release: Oct 19, 2021
  • Latest release: Oct 19, 2021
  • Number of updates: 4
  • Update frequency: every 4.5 days
  • Top authors: wpevince (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 265 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼310.18ms] Passed 4 tests

Server-side resources used by Custom Social Media Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1655.47 ▼3.81
Dashboard /wp-admin3.53 ▲0.1332.72 ▼1.31
Posts /wp-admin/edit.php3.77 ▲0.1335.01 ▼3.31
Add New Post /wp-admin/post-new.php7.00 ▲0.0394.17 ▼1,232.27
Media Library /wp-admin/upload.php3.42 ▲0.1226.88 ▲3.37

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 1 new option
New WordPress options
widget_custom-social-media-icons

Browser metrics Passed 4 tests

Checking browser requirements for Custom Social Media Icons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲1715.86 ▲0.136.52 ▲0.492.29 ▼0.33
Dashboard /wp-admin2,895 ▲346.16 ▼0.01118.47 ▼20.96156.54 ▼8.32
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0061.75 ▼3.05141.25 ▼2.11
Add New Post /wp-admin/post-new.php1,757 ▲9621.33 ▲3.81431.31 ▲9.01151.88 ▼8.64
Media Library /wp-admin/upload.php1,695 ▼35.53 ▲0.04154.98 ▲7.94190.82 ▼3.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_custom-social-media-icons

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-social-media-icons/custom-social-media-icons.php:13

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed: You can take inspiration from this readme.txt

custom-social-media-icons/custom-social-media-icons.php Passed 13 tests

Analyzing the main PHP file in "Custom Social Media Icons" version 1.0
129 characters long description:
Custom Social Media Icons plugin is a dynamic, simple solution to show icons that connect visitors to your numerous social pages.

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
Everything looks great! No dangerous files found in this plugin727 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP188138369
JavaScript1022186
SVG2300114
CSS17058

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected