84% social-media-shortcodes

Code Review | Social Media Shortcodes

WordPress plugin Social Media Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: social-media-shor...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 18, 2012
  • Latest release: May 26, 2023
  • Number of updates: 21
  • Update frequency: every 187.4 days
  • Top authors: tw2113 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Social Media Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.90 ▼2.03
Dashboard /wp-admin3.35 ▲0.0447.59 ▼8.32
Posts /wp-admin/edit.php3.40 ▲0.0449.06 ▼3.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.61 ▼12.54
Media Library /wp-admin/upload.php3.27 ▲0.0437.72 ▲1.03

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.69 ▼0.1843.64 ▲2.03
Dashboard /wp-admin2,192 ▲155.56 ▼0.0491.59 ▼1.2942.89 ▼2.25
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.1041.72 ▲1.2435.71 ▲0.81
Add New Post /wp-admin/post-new.php1,526 ▲12223.20 ▲5.36692.25 ▲128.3953.25 ▲2.54
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.03103.50 ▼4.6544.65 ▼0.50

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 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/social-media-shortcodes/social_media_shortcode_plugin.php:205

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: shortcodes, social media

social-media-shortcodes/social_media_shortcode_plugin.php 92% from 13 tests

"Social Media Shortcodes" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("social-media-shortcodes.php" instead of "social_media_shortcode_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected99 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1228499

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin