73% cool-social-icons-widget

Code Review | Cool Social Icons Widget

WordPress plugin Cool Social Icons Widget scored73%from 54 tests.

About plugin

  • Plugin page: cool-social-icons...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: May 22, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 9
  • Update frequency: every 11.9 days
  • Top authors: mr-koder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,318 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.68MB] [CPU: ▼46.58ms] Passed 4 tests

This is a short check of server-side resources used by Cool Social Icons Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.1513.72 ▼27.19
Dashboard /wp-admin2.32 ▼0.9811.62 ▼35.47
Posts /wp-admin/edit.php2.32 ▼1.0311.61 ▼34.69
Add New Post /wp-admin/post-new.php2.32 ▼3.5611.59 ▼88.97
Media Library /wp-admin/upload.php2.32 ▼0.909.13 ▼25.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_cool-social-icons
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Cool Social Icons Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.29 ▼1.291.85 ▼0.2838.80 ▼12.00
Dashboard /wp-admin2,206 ▲185.85 ▼0.00103.26 ▲0.8139.62 ▼2.23
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0639.67 ▼0.9434.89 ▼2.66
Add New Post /wp-admin/post-new.php1,539 ▼323.52 ▲5.40672.84 ▲67.5456.11 ▲0.27
Media Library /wp-admin/upload.php1,391 ▲64.18 ▲0.02101.53 ▼0.6644.22 ▲0.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/cool-social-icons-widget/cool-social-icons.php+54
    Trying to access array offset on value of type null
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_cool-social-icons
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cool-social-icons-widget/cool-social-icons.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (screenshoot-1.png), #2 (screenshoot-2.png), #3 (screenshoot-3.png)
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

cool-social-icons-widget/cool-social-icons.php 85% from 13 tests

"Cool Social Icons Widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cool-social-icons-widget.php" instead of "cool-social-icons.php")

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
Good job! No executable or dangerous file extensions detected225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15670143
CSS224082

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/icons/twitter.png0.35KB0.46KB0.00%
css/icons/flickr.png0.26KB0.25KB▼ 4.49%
css/icons/rss.png3.03KB0.53KB▼ 82.40%
css/icons/instagram-dark.png2.92KB0.29KB▼ 90.15%
css/icons/myspace-dark.png3.01KB0.45KB▼ 84.95%