10% auto-post-contents-for-facebook

Code Review | Social Media Auto Post and Scheduling contents

WordPress plugin Social Media Auto Post and Scheduling contents scored10%from 54 tests.

About plugin

  • Plugin page: auto-post-content...
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2019
  • Latest release: Nov 27, 2019
  • Number of updates: 13
  • Update frequency: every 25.7 days
  • Top authors: raefghribi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,152 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method raefghribi_auto_post::getLastPostsID() should not be called statically

Server metrics [RAM: ▲0.28MB] [CPU: ▲12.96ms] Passed 4 tests

Server-side resources used by Social Media Auto Post and Scheduling contents
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.12 ▼2.37
Dashboard /wp-admin3.74 ▲0.4465.52 ▲18.79
Posts /wp-admin/edit.php3.87 ▲0.5169.95 ▲24.95
Add New Post /wp-admin/post-new.php6.03 ▲0.14118.49 ▲31.00
Media Library /wp-admin/upload.php3.80 ▲0.5751.14 ▲10.45

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 93 new files
Database: 4 new tables, 6 new options
New tables
wp_last_done
wp_fb_auto_programs
wp_fb_pages
wp_fb_logs
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Social Media Auto Post and Scheduling contents: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,579 ▲80814.82 ▲0.071.59 ▼0.6944.52 ▲4.76
Dashboard /wp-admin2,990 ▲8026.24 ▲1.33110.75 ▲9.6465.25 ▲22.02
Posts /wp-admin/edit.php2,871 ▲7852.40 ▲0.3948.29 ▲13.6134.18 ▼2.07
Add New Post /wp-admin/post-new.php1,527 ▲823.33 ▲0.27658.05 ▼22.7255.70 ▲2.92
Media Library /wp-admin/upload.php2,167 ▲7764.48 ▲0.2999.66 ▲2.1940.80 ▼3.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/auto-post-contents-for-facebook/index.php
  • 42× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookCanvasHelper' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Helpers/FacebookPageTabHelper.php:199
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Helpers/FacebookCanvasHelper.php:181
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Exceptions/FacebookClientException.php:181
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Helpers/FacebookJavaScriptHelper.php:181
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/GraphNodes/GraphApplication.php:187
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookResponse' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/FacebookBatchResponse.php:205
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Exceptions/FacebookServerException.php:181
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Url\\UrlDetectionInterface' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/Url/FacebookUrlDetectionHandler.php:181
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/GraphNodes/GraphPage.php:181
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\Collection' not found in wp-content/plugins/auto-post-contents-for-facebook/Facebook/GraphNodes/GraphNode.php:181

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: auto post, fb, scheduler, publish

auto-post-contents-for-facebook/raefghribi-auto-post.php 85% from 13 tests

The primary PHP file in "Social Media Auto Post and Scheduling contents" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("auto-post-contents-for-facebook.php" instead of "raefghribi-auto-post.php")

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
Success! There were no dangerous files found in this plugin5,567 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP801,0515,5695,041
PO File4148148410
CSS1246116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.91
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces11
Interfaces5
Traits1
Classes70
▷ Abstract classes11.43%
▷ Concrete classes6998.57%
▷ Final classes00.00%
Methods548
▷ Static methods315.66%
▷ Public methods50491.97%
▷ Protected methods264.74%
▷ Private methods183.28%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants22
▷ Global constants00.00%
▷ Class constants22100.00%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/fb-auto-post.png22.60KB3.80KB▼ 83.20%