84% social-feed-gallery-portfolio

Code Review | Social Feed Gallery Portfolio

WordPress plugin Social Feed Gallery Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: social-feed-galle...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Jun 9, 2020
  • Latest release: Aug 26, 2020
  • Number of updates: 6
  • Update frequency: every 13.2 days
  • Top authors: wpdiscover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,017 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.39MB] [CPU: ▼0.72ms] Passed 4 tests

A check of server-side resources used by Social Feed Gallery Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3937.50 ▲0.67
Dashboard /wp-admin3.70 ▲0.3547.89 ▼8.40
Posts /wp-admin/edit.php3.80 ▲0.4450.89 ▲2.23
Add New Post /wp-admin/post-new.php6.33 ▲0.4495.18 ▲9.43
Media Library /wp-admin/upload.php3.62 ▲0.3937.98 ▲2.64
Galleries /wp-admin/edit.php?post_type=igp_wp3.6737.79
Add New /wp-admin/post-new.php?post_type=igp_wp3.7150.59

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 125 new files
Database: no new tables, 9 new options
New WordPress options
portfolio-wp-type
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
portfolio-wp-installDate
widget_recent-comments
can_compress_scripts
portfolio-wp-v

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Feed Gallery Portfolio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲27213.69 ▼0.5710.84 ▲8.9942.61 ▼8.11
Dashboard /wp-admin2,241 ▲534.81 ▼0.30112.37 ▲6.0041.29 ▼6.12
Posts /wp-admin/edit.php2,125 ▲362.00 ▼0.0138.55 ▼3.9934.68 ▼3.61
Add New Post /wp-admin/post-new.php1,562 ▲3423.29 ▲5.00655.20 ▲21.9961.50 ▲6.95
Media Library /wp-admin/upload.php1,427 ▲394.22 ▲0.03100.96 ▲3.1345.16 ▲0.94
Galleries /wp-admin/edit.php?post_type=igp_wp1,0971.9530.5430.37
Add New /wp-admin/post-new.php?post_type=igp_wp2,4665.43102.7850.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • portfolio-wp-installDate
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • portfolio-wp-type
    • theysaidso_admin_options
    • portfolio-wp-v

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-feed-gallery-portfolio/instagram-gallery-portfolio.php:18
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function scrape_instagram() in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/social-feed-gallery-portfolio/includes/admin/portfolio-wp-js-templates.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Portfolio_Template_Loader' not found in wp-content/plugins/social-feed-gallery-portfolio/includes/public/class-portfolio-shortcode.php:13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/social-feed-gallery-portfolio/includes/public/templates/portfolio-gallery.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "#"
The official readme.txt is a good inspiration

social-feed-gallery-portfolio/instagram-gallery-portfolio.php 92% from 13 tests

Analyzing the main PHP file in "Social Feed Gallery Portfolio" version 1.3
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-feed-gallery-portfolio.php" instead of "instagram-gallery-portfolio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin20,691 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
CSS192,2682547,391
SVG60135,587
PHP205984902,091
Sass1643341,903
LESS1641511,870
JavaScript176573881,849

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.60
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods58
▷ Static methods915.52%
▷ Public methods4475.86%
▷ Protected methods35.17%
▷ Private methods1118.97%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.27KB0.29KB0.00%
assets/images/prev.png1.33KB1.59KB0.00%
assets/images/next.png1.32KB1.58KB0.00%