83% dinat-social-feed

Code Review | Dinat Social Feed

WordPress plugin Dinat Social Feed scored83%from 54 tests.

About plugin

  • Plugin page: dinat-social-feed
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1.28+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.0
  • WordPress version: 6.3.1
  • First release: Jan 1, 2020
  • Latest release: Jun 7, 2022
  • Number of updates: 11
  • Update frequency: every 80.8 days
  • Top authors: mddalwar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.18ms] Passed 4 tests

Analyzing server-side resources used by Dinat Social Feed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.67 ▼3.81
Dashboard /wp-admin3.32 ▲0.0143.01 ▼4.65
Posts /wp-admin/edit.php3.37 ▲0.0147.78 ▲3.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.67 ▲5.58
Media Library /wp-admin/upload.php3.24 ▲0.0134.36 ▲0.35

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_insta-photo
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Dinat Social Feed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17313.93 ▼0.638.52 ▲6.4445.70 ▲0.01
Dashboard /wp-admin2,206 ▲155.86 ▼0.11107.17 ▲0.5144.45 ▲1.39
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0640.25 ▲4.2736.09 ▲1.01
Add New Post /wp-admin/post-new.php1,519 ▼2323.31 ▲5.02608.70 ▼21.7851.55 ▼5.51
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0293.10 ▼8.9940.53 ▼3.40

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_insta-photo
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dinat-social-feed/initial.php:33

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, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in dinat-social-feed/assets to your readme.txt
You can take inspiration from this readme.txt

dinat-social-feed/initial.php 77% from 13 tests

"Dinat Social Feed" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 180 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dinat-social-feed.php" instead of "initial.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
There were no executable files found in this plugin94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162875
JavaScript20019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin