74% improve-wp-default-social-icons-block

Code Review | Improve WP Default Social Icons Block

WordPress plugin Improve WP Default Social Icons Block scored74%from 54 tests.

About plugin

  • Plugin page: improve-wp-defaul...
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4
  • WordPress version: 6.3.1
  • First release: May 10, 2020
  • Latest release: May 10, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,581 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼42.05ms] Passed 4 tests

Analyzing server-side resources used by Improve WP Default Social Icons Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7013.47 ▼35.80
Dashboard /wp-admin2.81 ▼0.5017.66 ▼30.43
Posts /wp-admin/edit.php2.81 ▼0.5516.66 ▼30.31
Add New Post /wp-admin/post-new.php2.81 ▼3.0818.13 ▼71.67
Media Library /wp-admin/upload.php2.81 ▼0.4217.78 ▼14.76

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Improve WP Default Social Icons Block: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.73 ▼0.673.17 ▲1.3439.43 ▼4.40
Dashboard /wp-admin2,209 ▲214.88 ▼0.16103.08 ▼14.4336.96 ▼5.86
Posts /wp-admin/edit.php2,089 ▲32.00 ▼0.0139.43 ▲2.7234.54 ▼3.90
Add New Post /wp-admin/post-new.php6,421 ▲4,87928.54 ▲10.08917.52 ▲222.5440.73 ▼16.86
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0099.94 ▼0.8242.63 ▲0.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function WP_Block_Type_Registry::unregister was called incorrectly. Block type "core/social-link" is not registered. Please see Debugging in WordPress for more information. (This message was added in version 5.0.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/improve-wp-default-social-icons-block/improve-wp-default-social-icons-block.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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: comments, spam

improve-wp-default-social-icons-block/improve-wp-default-social-icons-block.php 85% from 13 tests

The main PHP file in "Improve WP Default Social Icons Block" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: Please keep the plugin description shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected688 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript68994510
PHP33772178

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png16.52KB5.39KB▼ 67.39%
assets/screenshot-5.png21.50KB5.78KB▼ 73.14%