78% social-engine

Code Review | Social Engine: Schedule Social Media Posts

WordPress plugin Social Engine: Schedule Social Media Posts scored78%from 54 tests.

About plugin

  • Plugin page: social-engine
  • Plugin version: 0.5.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 18, 2021
  • Latest release: Nov 29, 2023
  • Number of updates: 112
  • Update frequency: every 7.2 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

500+ active /11,586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▲3.27ms] Passed 4 tests

Server-side resources used by Social Engine: Schedule Social Media Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4843.72 ▲2.34
Dashboard /wp-admin3.84 ▲0.5449.40 ▲0.42
Posts /wp-admin/edit.php3.91 ▲0.5563.62 ▲18.23
Add New Post /wp-admin/post-new.php6.43 ▲0.5496.14 ▲5.26
Media Library /wp-admin/upload.php3.77 ▲0.5439.56 ▲5.06
Social Engine /wp-admin/upload.php?page=sclegn_dashboard3.6841.06
Social Engine /wp-admin/admin.php?page=sclegn_settings3.6836.86
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.8854.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 171 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
sclegn_options

Browser metrics Passed 4 tests

Checking browser requirements for Social Engine: Schedule Social Media Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11114.67 ▲0.281.78 ▼0.1945.78 ▼2.36
Dashboard /wp-admin2,257 ▲825.53 ▼0.0992.01 ▼22.4839.92 ▼5.20
Posts /wp-admin/edit.php2,252 ▲1525.55 ▲3.52130.04 ▲95.2937.83 ▲1.50
Add New Post /wp-admin/post-new.php1,580 ▲5423.35 ▲0.03589.85 ▼67.3953.10 ▲4.61
Media Library /wp-admin/upload.php1,468 ▲684.20 ▲0.0394.76 ▼3.7843.17 ▼0.30
Social Engine /wp-admin/upload.php?page=sclegn_dashboard1,1697.37208.3347.96
Social Engine /wp-admin/admin.php?page=sclegn_settings1,1434.84100.6040.36
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,6805.35109.5069.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • sclegn_options
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-engine/vendor-forked/zoonman/linkedin-api-php-client/tests/bootstrap.php
  • 67× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SCLEGN_PATH - assumed 'SCLEGN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-engine/classes/services/twitter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\Collection' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphNode.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\HttpClients\\FacebookHttpClientInterface' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php:34
    • > PHP Fatal error
      require_once(): Failed opening required 'SCLEGN_PATH/classes/services/mastodon/client.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-engine/classes/services/mastodon.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/Exceptions/FacebookOtherException.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/social-engine/vendor-forked/zoonman/linkedin-api-php-client/tests/AccessTokenTest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphEvent.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PseudoRandomString\\PseudoRandomStringGeneratorInterface' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/PseudoRandomString/UrandomPseudoRandomStringGenerator.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'LinkedIn\\AbstractEnum' not found in wp-content/plugins/social-engine/vendor-forked/zoonman/linkedin-api-php-client/src/Scope.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PersistentData\\PersistentDataInterface' not found in wp-content/plugins/social-engine/vendor/facebook/graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in social-engine/assets to your readme.txt
You can look at the official readme.txt

social-engine/social-engine.php 92% from 13 tests

The primary PHP file in "Social Engine: Schedule Social Media Posts" version 0.5.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected11,927 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1342,0388,00610,913
Markdown102020536
JSON600430
XML20038
YAML1208
JavaScript2042

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.29
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces18
Interfaces5
Traits1
Classes111
▷ Abstract classes32.70%
▷ Concrete classes10897.30%
▷ Final classes00.00%
Methods911
▷ Static methods9210.10%
▷ Public methods83791.88%
▷ Protected methods424.61%
▷ Private methods323.51%
Functions33
▷ Named functions721.21%
▷ Anonymous functions2678.79%
Constants49
▷ Global constants612.24%
▷ Class constants4387.76%
▷ Public constants4297.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin