76% social-feed-ez

Code Review | Social Feed EZ

WordPress plugin Social Feed EZ scored 76% from 54 tests.

About plugin

  • Plugin page: social-feed-ez
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.7.2
  • WordPress version: 5.9.2
  • First release: Jul 1, 2021
  • Latest release: Oct 30, 2021
  • Number of updates: 11
  • Update frequency: every 11.1 days
  • Top authors: mburbage78 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 157 total downloads

Benchmarks

Plugin footprint Passed 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.10MB] [CPU: ▼290.08ms] Passed 4 tests

An overview of server-side resources used by Social Feed EZ
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1757.39 ▲7.90
Dashboard /wp-admin3.53 ▲0.1338.95 ▲6.31
Posts /wp-admin/edit.php3.76 ▲0.1239.95 ▲1.65
Add New Post /wp-admin/post-new.php6.99 ▲0.0294.41 ▼1,169.14
Media Library /wp-admin/upload.php3.41 ▲0.1226.18 ▲0.85
Social Feed EZ /wp-admin/options-general.php?page=social_feed_ez3.3571.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 112 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Social Feed EZ: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲6615.73 ▼0.036.72 ▲0.892.78 ▲0.71
Dashboard /wp-admin2,897 ▲396.12 ▼0.12117.33 ▼17.20156.46 ▼6.27
Posts /wp-admin/edit.php2,696 ▲53.24 ▼0.0063.91 ▼2.96133.56 ▼10.97
Add New Post /wp-admin/post-new.php1,761 ▲7122.03 ▲1.45458.75 ▼41.75154.52 ▲1.80
Media Library /wp-admin/upload.php1,700 ▼15.49 ▼0.05155.62 ▲11.71196.66 ▲9.00
Social Feed EZ /wp-admin/options-general.php?page=social_feed_ez9752.6355.2291.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=social_feed_ez
    • > Notice in wp-content/plugins/social-feed-ez/includes/admin.php+290
    Undefined index: tab

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-feed-ez/templates/content_single_post.php
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/GraphNodes/GraphObject.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/Helpers/FacebookJavaScriptHelper.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/Exceptions/FacebookResumableUploadException.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNodeFactory' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/GraphNodes/GraphObjectFactory.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FileUpload\\FacebookFile' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/FileUpload/FacebookVideo.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookRequest' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/FacebookBatchRequest.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Http\\RequestBodyInterface' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/Http/RequestBodyUrlEncoded.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/GraphNodes/GraphEvent.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PersistentData\\PersistentDataInterface' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-feed-ez/vendors/facebook/graph-sdk/src/Facebook/GraphNodes/GraphAchievement.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=social_feed_ez
    • > Javascript (severe) in unknown
    /wp-content/plugins/social-feed-ez/assets/js/admin.js?ver=5.9.2 1:58 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: The official readme.txt is a good inspiration

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

The main PHP file in "Social Feed EZ" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "3.8.0")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.6" instead of "5.2")

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
Everything looks great! No dangerous files found in this plugin6,682 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PHP911,1925,9005,575
SVG100801
CSS428137
JSON200104
JavaScript1381556
XML1007
Markdown1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.04
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces12
Interfaces5
Traits1
Classes71
▷ Abstract classes11.41%
▷ Concrete classes7098.59%
▷ Final classes00.00%
Methods534
▷ Static methods203.75%
▷ Public methods48991.57%
▷ Protected methods264.87%
▷ Private methods193.56%
Functions23
▷ Named functions1982.61%
▷ Anonymous functions417.39%
Constants23
▷ Global constants14.35%
▷ Class constants2295.65%
▷ Public constants22100.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 files were detected