84% social-icons-by-demoify

Code Review | Social Icons By Demoify

WordPress plugin Social Icons By Demoify scored84%from 54 tests.

About plugin

  • Plugin page: social-icons-by-d...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Jun 27, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: demoify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.28ms] Passed 4 tests

A check of server-side resources used by Social Icons By Demoify
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0542.91 ▲1.53
Dashboard /wp-admin3.39 ▲0.0547.57 ▼6.41
Posts /wp-admin/edit.php3.44 ▲0.0548.61 ▲2.84
Add New Post /wp-admin/post-new.php5.97 ▲0.0580.71 ▼16.65
Media Library /wp-admin/upload.php3.31 ▲0.0536.10 ▼7.59

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: no files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_social_icon
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Social Icons By Demoify
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.30 ▼1.081.88 ▼0.0642.58 ▼0.69
Dashboard /wp-admin2,206 ▲154.88 ▼1.00102.38 ▼0.6238.69 ▼8.13
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0339.73 ▲1.8235.71 ▲2.98
Add New Post /wp-admin/post-new.php1,533 ▲1423.26 ▼0.02673.02 ▲27.4458.19 ▲3.82
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0194.66 ▼4.9747.54 ▲3.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_social_icon
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-icons-by-demoify/social-icons-by-demoify.php:25

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

social-icons-by-demoify/social-icons-by-demoify.php Passed 13 tests

The main PHP script in "Social Icons By Demoify" version 1.0.0 is automatically included on every request by WordPress
78 characters long description:
This is a free WordPress plugin you can insert socials icons in your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23925136
CSS114278

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.28
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity9.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png171.81KB55.56KB▼ 67.66%