78% iaf-social-share

Code Review | IAF Social Share

WordPress plugin IAF Social Share scored78%from 54 tests.

About plugin

  • Plugin page: iaf-social-share
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: Jul 2, 2021
  • Number of updates: 34
  • Update frequency: every 20.6 days
  • Top authors: willfonkam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.32ms] Passed 4 tests

Server-side resources used by IAF Social Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.61 ▼7.90
Dashboard /wp-admin3.38 ▲0.0845.74 ▼4.24
Posts /wp-admin/edit.php3.43 ▲0.0841.80 ▼6.52
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.09 ▼6.61
Media Library /wp-admin/upload.php3.30 ▲0.0835.48 ▼3.44

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for IAF Social Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.89 ▲0.3672.03 ▲70.3978.65 ▲34.41
Dashboard /wp-admin2,207 ▲265.66 ▼0.0693.59 ▼4.7141.95 ▼0.83
Posts /wp-admin/edit.php2,112 ▲121.97 ▼0.0434.79 ▲0.0233.54 ▼2.47
Add New Post /wp-admin/post-new.php1,538 ▲1223.32 ▼0.19651.63 ▼61.2059.43 ▼10.42
Media Library /wp-admin/upload.php1,415 ▲124.20 ▲0.0697.96 ▼5.1143.88 ▲1.11

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/iaf-social-share/inc/share-template.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/iaf-social-share/inc/admin/sidebar-box.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/iaf-social-share/inc/admin/settings-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/iaf-social-share/iaf-social-share.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: social media, boutons, rseaux sociaux, button, partage...

iaf-social-share/iaf-social-share.php 92% from 13 tests

The main file in "IAF Social Share" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,200 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP159632649
CSS68013377
PO File14351121
JavaScript35853

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin