77% social-feeder

Code Review | Social Feeder

WordPress plugin Social Feederscored77%from 54 tests.

About plugin

  • Plugin page: social-feeder
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.8
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Aug 5, 2021
  • Number of updates: 29
  • Update frequency: every 70.2 days
  • Top authors: 10quality (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,911 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Social Feeder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6047.34 ▲9.76
Dashboard /wp-admin3.96 ▲0.6650.72 ▲0.16
Posts /wp-admin/edit.php4.07 ▲0.7252.86 ▼1.04
Add New Post /wp-admin/post-new.php6.54 ▲0.6695.06 ▼6.36
Media Library /wp-admin/upload.php3.88 ▲0.6541.37 ▲5.70
Social Feeder /wp-admin/options-general.php?page=social-feeder-settings4.0438.04

Server storage [IO: ▲3.30MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • The plugin illegally modified 2 files (0.06KB) outside of "wp-content/plugins/social-feeder/" and "wp-content/uploads/"
    • (new file) wp-content/wpmvc/log/.empty
    • (new file) wp-content/wpmvc/cache/pcom/.htaccess
Filesystem: 682 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_social-feeder-widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Social Feeder: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.55 ▼0.701.74 ▲0.0743.89 ▼1.70
Dashboard /wp-admin2,213 ▲274.87 ▼0.16109.59 ▼7.0943.39 ▼5.16
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0239.25 ▼1.7236.20 ▲0.10
Add New Post /wp-admin/post-new.php1,536 ▲323.18 ▲0.03594.87 ▼91.3538.62 ▼10.83
Media Library /wp-admin/upload.php1,386 ▼54.24 ▲0.0895.47 ▼8.2740.43 ▼6.35
Social Feeder /wp-admin/options-general.php?page=social-feeder-settings1,5201.7128.7933.61

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_social-feeder-widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-feeder/assets/views/embed/youtube.php
    • > /wp-content/plugins/social-feeder/vendor/j7mbo/twitter-api-php/index.php
    • > /wp-content/plugins/social-feeder/assets/views/feed/legacy.php
  • 441× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/StringIncrement.php:18
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-feeder/app/Config/app.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Collection\\Iterator\\CursorBasedIterator' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Collection/Iterator/Keyspace.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/ConnectionEcho.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\CommunicationException' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Connection/ConnectionException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/ListRange.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-feeder/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphCoverPhoto.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\ClientInterface' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Client.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\Collection' not found in wp-content/plugins/social-feeder/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphNode.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\ServerInfo' not found in wp-content/plugins/social-feeder/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/ServerInfoV26x.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === Social Feeder=== )
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

social-feeder/plugin.php 77% from 13 tests

"Social Feeder" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.4" instead of "5.6")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-feeder.php" instead of "plugin.php")
  • Domain Path: The domain path is invalid: folder "/assets/lang/" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected36,988 lines of code in 649 files:
LanguageFilesBlank linesComment linesLines of code
PHP5726,19822,15928,350
Markdown541,61004,790
SVG1002,671
JSON11101,033
XML800118
INI16624
CSS2032

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces69
Interfaces47
Traits19
Classes469
▷ Abstract classes285.97%
▷ Concrete classes44194.03%
▷ Final classes10.23%
Methods2,564
▷ Static methods1064.13%
▷ Public methods2,20285.88%
▷ Protected methods27410.69%
▷ Private methods883.43%
Functions61
▷ Named functions2032.79%
▷ Anonymous functions4167.21%
Constants83
▷ Global constants44.82%
▷ Class constants7995.18%
▷ Public constants79100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/j7mbo/twitter-api-php/test/img.png18.88KB10.40KB▼ 44.90%