78% socialmedia-gallery

Code Review | = SocialMedia Gallery

WordPress plugin = SocialMedia Gallery scored78%from 54 tests.

About plugin

  • Plugin page: socialmedia-gallery
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Jan 12, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: sus1024 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /831 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.26ms] Passed 4 tests

Analyzing server-side resources used by = SocialMedia Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.42 ▼13.18
Dashboard /wp-admin3.31 ▲0.0142.81 ▼4.63
Posts /wp-admin/edit.php3.36 ▲0.0048.71 ▲1.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.50 ▼12.68
Media Library /wp-admin/upload.php3.23 ▲0.0035.33 ▲2.32

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for = SocialMedia Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22113.68 ▼0.7110.19 ▲8.4237.92 ▼6.36
Dashboard /wp-admin2,203 ▲155.80 ▼0.02105.08 ▼1.2241.12 ▼4.55
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0135.81 ▼1.9735.57 ▲1.76
Add New Post /wp-admin/post-new.php1,533 ▲523.12 ▲4.73682.96 ▲71.2061.95 ▲9.64
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0193.55 ▼10.5842.92 ▼1.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/socialmedia-gallery/facebook-gallery.php
    • > /wp-content/plugins/socialmedia-gallery/facebook.php
    • > /wp-content/plugins/socialmedia-gallery/facebook-video.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/socialmedia-gallery/facebook.php on line 37
    • > PHP Warning
      file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=&client_secret=&grant_type=client_credentials): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r in wp-content/plugins/socialmedia-gallery/facebook.php on line 16
    • > PHP Warning
      file_get_contents(https://graph.facebook.com/v2.11//photos?limit=&fields=images,name&access_token=): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r in wp-content/plugins/socialmedia-gallery/facebook-gallery.php on line 30
    • > PHP Notice
      Undefined variable: fbappid in wp-content/plugins/socialmedia-gallery/facebook-gallery.php on line 13
    • > PHP Warning
      file_get_contents(https://graph.facebook.com/v2.11//photos?limit=&fields=images,name&access_token=): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r in wp-content/plugins/socialmedia-gallery/facebook.php on line 30
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/socialmedia-gallery/facebook-gallery.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/socialmedia-gallery/index.php:70
    • > PHP Warning
      file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=&client_secret=&grant_type=client_credentials): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r in wp-content/plugins/socialmedia-gallery/facebook-gallery.php on line 16
    • > PHP Notice
      Undefined variable: fbappsecret in wp-content/plugins/socialmedia-gallery/facebook-video.php on line 12
    • > PHP Notice
      Undefined variable: total_fb_image in wp-content/plugins/socialmedia-gallery/facebook.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

socialmedia-gallery/index.php 92% from 13 tests

"= SocialMedia Gallery" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("socialmedia-gallery.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,243 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript418499804
CSS21935306
PHP45042133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected