72% compygo-social-feed

Code Review | Social Feed for Wordpress by CompyGo

WordPress plugin Social Feed for Wordpress by CompyGo scored72%from 54 tests.

About plugin

  • Plugin page: compygo-social-feed
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 1, 2022
  • Latest release: Mar 9, 2023
  • Number of updates: 21
  • Update frequency: every 10.4 days
  • Top authors: denisskolesins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▲27.36ms] Passed 4 tests

This is a short check of server-side resources used by Social Feed for Wordpress by CompyGo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7186.77 ▲42.80
Dashboard /wp-admin3.77 ▲0.4696.94 ▲45.68
Posts /wp-admin/edit.php3.88 ▲0.5295.39 ▲38.34
Add New Post /wp-admin/post-new.php6.35 ▲0.46137.49 ▲20.48
Media Library /wp-admin/upload.php3.61 ▲0.3846.75 ▲7.81
Settings /wp-admin/admin.php?page=cgusf_settings3.8443.48
Feeds /wp-admin/admin.php?page=cgusf_feeds3.8342.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 388 new files
Database: 3 new tables, 19 new options
New tables
wp_cgusf_sources
wp_cgusf_posts
wp_cgusf_feeds
New WordPress options
cgusf_locale
widget_recent-comments
cgusf_db_version
cgusf_strings
cgusf_facebook_app_id
cgusf_custom_css
cgusf_logs
widget_recent-posts
cgusf_cache_time
cgusf_stats
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Feed for Wordpress by CompyGo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.41 ▲0.041.66 ▼0.2341.50 ▲3.24
Dashboard /wp-admin2,223 ▲465.65 ▲0.0888.30 ▼4.6874.41 ▲26.55
Posts /wp-admin/edit.php2,149 ▲461.99 ▲0.0437.35 ▼5.2533.94 ▼11.69
Add New Post /wp-admin/post-new.php6,229 ▲4,70318.82 ▼4.31923.20 ▲263.0438.97 ▼16.84
Media Library /wp-admin/upload.php1,440 ▲434.11 ▼0.07106.04 ▼6.5471.60 ▲25.26
Settings /wp-admin/admin.php?page=cgusf_settings1,4759.43166.3351.31
Feeds /wp-admin/admin.php?page=cgusf_feeds9597.07118.0234.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 18 options
    • cgusf_logs
    • widget_theysaidso_widget
    • cgusf_custom_css
    • widget_recent-posts
    • cgusf_facebook_app_secret
    • db_upgraded
    • cgusf_facebook_app_id
    • cgusf_license_key
    • theysaidso_admin_options
    • cgusf_locale
    • ...

Smoke tests 25% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/list_controls.php
    • > /wp-content/plugins/compygo-social-feed/vendor/league/plates/example/templates/sidebar.php
    • > /wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/items_data.php
    • > /wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/account_meta.php
  • 152× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CompygoSocialFeed\\Helper\\Api\\AbstractHelper' not found in wp-content/plugins/compygo-social-feed/src/Helper/Api/YoutubeHelper.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/compygo-social-feed/vendor/guzzlehttp/guzzle/src/Client.php:17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/post_media.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/compygo-social-feed/compygo-social-feed.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'CompygoSocialFeed\\Api\\Social\\Social' not found in wp-content/plugins/compygo-social-feed/src/Api/Social/Youtube.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/account_meta.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/compygo-social-feed/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/compygo-social-feed/src/web/templates/frontend/post_layout/one_col_ci.php:1
    • > PHP Notice
      Undefined variable: feed in wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/post_media.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/compygo-social-feed/src/web/templates/frontend/blocks/post_meta.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=cgusf_settings
    • > Console-api (warning) in wp-content/plugins/compygo-social-feed/pub/admin.main.js?ver=2.0.0+1:225393
    [BootstrapVue warn]: BFormSelect - Setting prop \"options\" to an object is deprecated. Use the array format instead.

Optimizations

Plugin configuration 86% 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 to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

compygo-social-feed/compygo-social-feed.php 77% from 13 tests

"Social Feed for Wordpress by CompyGo" version 2.0.0'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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 259 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin20,849 lines of code in 316 files:
LanguageFilesBlank linesComment linesLines of code
PHP2052,9576,79114,635
Markdown411,59504,568
JSON10001,159
JavaScript894141
HTML5112120
SVG360172
YAML39059
CSS62550
XML13033
TOML13012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.84
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces22
Interfaces27
Traits3
Classes132
▷ Abstract classes43.03%
▷ Concrete classes12896.97%
▷ Final classes3527.34%
Methods1,041
▷ Static methods27025.94%
▷ Public methods88184.63%
▷ Protected methods373.55%
▷ Private methods12311.82%
Functions140
▷ Named functions3525.00%
▷ Anonymous functions10575.00%
Constants110
▷ Global constants1412.73%
▷ Class constants9687.27%
▷ Public constants8588.54%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pub/239d1c177f3f17662bf6.png1.32KB0.67KB▼ 49.74%
pub/img/cff-icon.png5.63KB4.54KB▼ 19.47%
pub/img/feature_design.png1.32KB0.67KB▼ 49.74%
pub/img/feature_zoom.png1.45KB0.77KB▼ 46.73%
pub/925c3541574476e8e6e1.png1.69KB1.15KB▼ 32.35%