83% sitemile-social-icons-widget

Code Review | SiteMile Social Icons Widget

WordPress plugin SiteMile Social Icons Widget scored83%from 54 tests.

About plugin

  • Plugin page: sitemile-social-i...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 5, 2021
  • Latest release: Aug 5, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: sitemile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by SiteMile Social Icons Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0426.25 ▼14.61
Dashboard /wp-admin3.42 ▲0.1249.83 ▼1.33
Posts /wp-admin/edit.php3.47 ▲0.1252.20 ▲1.29
Add New Post /wp-admin/post-new.php6.00 ▲0.1298.22 ▲6.48
Media Library /wp-admin/upload.php3.35 ▲0.1240.47 ▲9.33

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_sitemile-social-icons-widget
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

SiteMile Social Icons Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.011.67 ▼0.3445.30 ▲0.55
Dashboard /wp-admin2,195 ▲185.58 ▼0.0791.30 ▼0.4141.79 ▲0.06
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0138.92 ▲0.9535.62 ▼3.52
Add New Post /wp-admin/post-new.php1,526 ▼323.02 ▼0.33692.52 ▲47.2352.98 ▼8.44
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.00102.34 ▼5.9844.47 ▼1.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_sitemile-social-icons-widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please 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/sitemile-social-icons-widget/sitemile-social-widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === sitemile-social-icons-widget === )
The official readme.txt might help

sitemile-social-icons-widget/sitemile-social-widget.php 77% from 13 tests

The main file in "SiteMile Social Icons Widget" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sitemile-social-icons-widget.php" instead of "sitemile-social-widget.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin691 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP112532334
JavaScript1023186
SVG2300114
CSS17057

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in 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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin