84% social-media-auto-publish

Code Review | Social Media Auto Publish

WordPress plugin Social Media Auto Publish scored84%from 54 tests.

About plugin

  • Plugin page: social-media-auto...
  • Plugin version: 3.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Oct 13, 2023
  • Number of updates: 70
  • Update frequency: every 54.8 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

326 reviews

Install metrics

10,000+ active /479,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.83MB] [CPU: ▼1.30ms] Passed 4 tests

A check of server-side resources used by Social Media Auto Publish
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8748.66 ▲4.82
Dashboard /wp-admin4.17 ▲0.8652.09 ▲3.32
Posts /wp-admin/edit.php4.22 ▲0.8650.05 ▼0.54
Add New Post /wp-admin/post-new.php6.71 ▲0.8286.31 ▼12.80
Media Library /wp-admin/upload.php4.03 ▲0.8045.63 ▲11.30
Suggest a Feature /wp-admin/admin.php?page=social-media-auto-publish-suggest-features4.0535.64
Settings /wp-admin/admin.php?page=social-media-auto-publish-settings5.2740.70
Logs /wp-admin/admin.php?page=social-media-auto-publish-log4.0536.87
About /wp-admin/admin.php?page=social-media-auto-publish-about4.2641.11

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 364 new files
Database: no new tables, 93 new options
New WordPress options
xyz_smap_lnpost_permission
xyz_smap_twmessage
xyz_smap_ig_app_sel_mode
xyz_smap_lnapikey
xyz_smap_smapsoln_userid_tw
xyz_smap_lnaf
xyz_smap_peer_verification
xyz_smap_credit_dismiss
xyz_smap_twtr_char_limit
xyz_smap_igapplication_secret
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Auto Publish
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲4614.68 ▲0.231.78 ▼0.1644.18 ▼0.78
Dashboard /wp-admin2,235 ▲585.58 ▼0.0680.12 ▼6.5757.78 ▲21.02
Posts /wp-admin/edit.php2,140 ▲402.01 ▼0.0134.48 ▼5.3234.95 ▼3.27
Add New Post /wp-admin/post-new.php1,565 ▲3023.29 ▲4.94754.10 ▲120.1552.44 ▼20.63
Media Library /wp-admin/upload.php1,446 ▲464.28 ▲0.04106.99 ▲9.2268.51 ▲26.11
Suggest a Feature /wp-admin/admin.php?page=social-media-auto-publish-suggest-features1,1191.6923.8954.00
Settings /wp-admin/admin.php?page=social-media-auto-publish-settings3,2841.9930.65106.04
Logs /wp-admin/admin.php?page=social-media-auto-publish-log1,1461.6723.8434.21
About /wp-admin/admin.php?page=social-media-auto-publish-about2,1961.7425.4644.86

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • xyz_credit_link
    • theysaidso_admin_options
    • xyz_smap_tb_af
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
  • 104× 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-media-auto-publish/api/Facebook/GraphNodes/GraphApplication.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/social-media-auto-publish/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-media-auto-publish/api/Facebook/GraphNodes/GraphAchievement.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/social-media-auto-publish/vendor/guzzlehttp/promises/src/FulfilledPromise.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PseudoRandomString\\PseudoRandomStringGeneratorInterface' not found in wp-content/plugins/social-media-auto-publish/api/Facebook/PseudoRandomString/OpenSslPseudoRandomStringGenerator.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/social-media-auto-publish/api/Facebook/GraphNodes/GraphEvent.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Http\\RequestBodyInterface' not found in wp-content/plugins/social-media-auto-publish/api/Facebook/Http/RequestBodyUrlEncoded.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/social-media-auto-publish/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/social-media-auto-publish/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PseudoRandomString\\PseudoRandomStringGeneratorInterface' not found in wp-content/plugins/social-media-auto-publish/api/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php:28

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
The official readme.txt might help

social-media-auto-publish/social-media-auto-publish.php 92% from 13 tests

The main PHP file in "Social Media Auto Publish" ver. 3.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)

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
Everything looks great! No dangerous files found in this plugin45,237 lines of code in 304 files:
LanguageFilesBlank linesComment linesLines of code
PHP2504,73913,18127,578
PO File93,2404,1368,726
Markdown211,51404,094
SVG1002,671
JSON15001,409
CSS21978630
YAML316370
JavaScript13036
XML20023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.08
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces28
Interfaces31
Traits4
Classes194
▷ Abstract classes73.61%
▷ Concrete classes18796.39%
▷ Final classes3518.72%
Methods1,569
▷ Static methods20112.81%
▷ Public methods1,34785.85%
▷ Protected methods402.55%
▷ Private methods18211.60%
Functions199
▷ Named functions6130.65%
▷ Anonymous functions13869.35%
Constants98
▷ Global constants99.18%
▷ Class constants8990.82%
▷ Public constants7584.27%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/linkedin.png0.87KB0.87KB0.00%
images/star.png3.35KB0.83KB▼ 75.35%
images/new_star.png4.65KB1.93KB▼ 58.47%
images/edit.png3.18KB2.07KB▼ 34.91%
images/delete.png3.59KB2.18KB▼ 39.36%