93% social-feed-block

Code Review | Social Feed Block - Display Social Feed

WordPress plugin Social Feed Block - Display Social Feed scored 93% from 54 tests.

About plugin

  • Plugin page: social-feed-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Mar 15, 2022
  • Latest release: Mar 15, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: charlescormier (75%)abuhayat (50%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 88 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼310.21ms] Passed 4 tests

A check of server-side resources used by Social Feed Block - Display Social Feed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0551.64 ▲2.00
Dashboard /wp-admin3.47 ▲0.0632.37 ▼3.01
Posts /wp-admin/edit.php3.69 ▲0.0534.12 ▼1.24
Add New Post /wp-admin/post-new.php6.93 ▼0.0496.75 ▼1,236.99
Media Library /wp-admin/upload.php3.34 ▲0.0524.04 ▲0.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Social Feed Block - Display Social Feed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.93 ▲0.236.17 ▲0.502.11 ▼0.06
Dashboard /wp-admin2,895 ▲376.07 ▼0.10118.69 ▼17.05154.48 ▼4.33
Posts /wp-admin/edit.php2,691 ▲33.37 ▲0.1461.61 ▲1.61135.54 ▼10.31
Add New Post /wp-admin/post-new.php1,701 ▲4018.36 ▲2.33447.07 ▲40.54179.20 ▲20.71
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.01139.18 ▼5.04177.62 ▼8.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant IFB_PLUGIN_VERSION - assumed 'IFB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-feed-block/dist/editor.asset.php on line 3
    • > PHP Warning
      Use of undefined constant IFB_PLUGIN_VERSION - assumed 'IFB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-feed-block/dist/script.asset.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #2 (Social Feed)
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

social-feed-block/index.php 85% from 13 tests

"Social Feed Block - Display Social Feed" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-feed-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin230 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON100147
PHP3121479
CSS2002
JavaScript2022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dist/src/img/logo-small.png7.63KB6.87KB▼ 9.96%