72% elegantui-social-media-icons

Code Review | ElegantUI Social Media Icons

WordPress plugin ElegantUI Social Media Icons scored72%from 54 tests.

About plugin

  • Plugin page: elegantui-social-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2019
  • Latest release: Jul 11, 2019
  • Number of updates: 17
  • Update frequency: every 1.7 days
  • Top authors: mdboon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /660 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.70ms] Passed 4 tests

Server-side resources used by ElegantUI Social Media Icons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0522.57 ▼15.14
Dashboard /wp-admin3.38 ▲0.0743.00 ▼3.26
Posts /wp-admin/edit.php3.49 ▲0.1351.58 ▲4.30
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.08 ▼12.68
Media Library /wp-admin/upload.php3.30 ▲0.0736.17 ▲5.22
EUI Social Media Icons /wp-admin/options-general.php?page=eui-smi3.3431.22

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ElegantUI Social Media Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.65 ▼1.007.65 ▲6.0531.99 ▼6.11
Dashboard /wp-admin2,206 ▲255.78 ▲0.0791.88 ▼8.3649.06 ▲8.51
Posts /wp-admin/edit.php2,108 ▲82.01 ▼0.0038.82 ▲4.3752.13 ▲15.40
Add New Post /wp-admin/post-new.php1,533 ▲723.45 ▲0.40655.59 ▲26.2768.39 ▼4.66
Media Library /wp-admin/upload.php1,411 ▲84.27 ▲0.0598.24 ▼1.3952.91 ▲10.07
EUI Social Media Icons /wp-admin/options-general.php?page=eui-smi1,1843.2651.4837.49

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=eui-smi
    • > Notice in wp-content/plugins/elegantui-social-media-icons/admin/partials/eui-smi-admin-display.php+38
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/facebook.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/youtube.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/instagram.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/twitter.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/rss.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/smi/medium.php
    • > /wp-content/plugins/elegantui-social-media-icons/public/partials/eui-smi-public-display.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/medium.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/instagram.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/twitter.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/twitter.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/twitter.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/rss.php on line 1
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/elegantui-social-media-icons/public/smi/facebook.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/rss.php on line 1
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/elegantui-social-media-icons/public/smi/instagram.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/elegantui-social-media-icons/public/smi/instagram.php on line 1

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: elegant, icons, ui, social media icons, social...

elegantui-social-media-icons/eui-smi.php 85% from 13 tests

"ElegantUI Social Media Icons" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("elegantui-social-media-icons.php" instead of "eui-smi.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
No dangerous file extensions were detected459 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP18154570350
CSS221895
JavaScript26548
SVG6006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.71
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin