83% social-media-library

Code Review | Social Media Downloader

WordPress plugin Social Media Downloader scored 83% from 54 tests.

About plugin

  • Plugin page: social-media-library
  • Plugin version: 1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jun 29, 2021
  • Latest release: Jul 23, 2021
  • Number of updates: 15
  • Update frequency: every 1.6 days
  • Top authors: mottodesignstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.68ms] Passed 4 tests

Server-side resources used by Social Media Downloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1252.41 ▲8.77
Dashboard /wp-admin3.42 ▲0.1248.23 ▼8.43
Posts /wp-admin/edit.php3.53 ▲0.1850.51 ▲0.90
Add New Post /wp-admin/post-new.php6.00 ▲0.1296.29 ▼6.73
Media Library /wp-admin/upload.php3.34 ▲0.1141.43 ▲7.53

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Downloader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.061.76 ▼0.1843.41 ▼2.50
Dashboard /wp-admin2,206 ▲155.79 ▲0.9396.58 ▼4.9037.87 ▼6.02
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0139.45 ▼0.5635.12 ▲0.51
Add New Post /wp-admin/post-new.php1,526 ▼1617.64 ▼0.35664.78 ▲50.5836.69 ▼20.37
Media Library /wp-admin/upload.php1,363 ▼284.30 ▲0.06113.20 ▲11.9546.42 ▲3.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 83× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'InstagramScraper\\TwoStepVerification\\TwoStepVerificationInterface' not found in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/src/InstagramScraper/TwoStepVerification/ConsoleVerification.php:12
    • > PHP Warning
      require(wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/twoStepAutoVerification/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/twoStepAutoVerification/EmailVerification.php on line 2
    • > PHP Warning
      require(wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/getPaginateMediasByTag.php on line 4
    • > PHP Warning
      require(wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/searchAccountsByUsername.php on line 4
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/getAccountFollowers.php on line 4
    • > PHP Warning
      require(wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/getMediasByLocationId.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'InstagramScraper\\Model\\AbstractModel' not found in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/src/InstagramScraper/Model/Highlight.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'InstagramScraper\\Model\\AbstractModel' not found in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/src/InstagramScraper/Model/Tag.php:9
    • > PHP Warning
      require(wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/getSidecarMediaByUrl.php on line 4
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-media-library/vendor/restyler/instagram-php-scraper/examples/getAccountByUsername.php on line 2

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: media downloader, instagram, feed, social, media library

social-media-library/index.php 77% from 13 tests

This is the main PHP file of "Social Media Downloader" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "5.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-media-library.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin6,871 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP891,4842,3666,106
Markdown61760387
JSON500275
YAML27643
JavaScript111135
XML22025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.49
▷ Minimum class complexity1.00
▷ Maximum class complexity254.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces15
Interfaces5
Traits2
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes00.00%
Methods482
▷ Static methods9820.33%
▷ Public methods42588.17%
▷ Protected methods306.22%
▷ Private methods275.60%
Functions20
▷ Named functions210.00%
▷ Anonymous functions1890.00%
Constants99
▷ Global constants11.01%
▷ Class constants9898.99%
▷ Public constants98100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin