52% accesspress-facebook-auto-post

Code Review | Social Auto Poster

WordPress plugin Social Auto Poster scored 52% from 54 tests.

About plugin

  • Plugin page: accesspress-faceb...
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 5.9.2
  • First release: Jun 18, 2015
  • Latest release: Dec 17, 2021
  • Number of updates: 74
  • Update frequency: every 32.1 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

6,000+ active / 327,611 total downloads


Plugin footprint 65% 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.10MB] [CPU: ▼290.17ms] Passed 4 tests

This is a short check of server-side resources used by Social Auto Poster
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1857.34 ▲1.75
Dashboard /wp-admin3.54 ▲0.1339.23 ▲0.75
Posts /wp-admin/edit.php3.76 ▲0.12124.00 ▲82.97
Add New Post /wp-admin/post-new.php7.00 ▲0.03100.64 ▼1,163.59
Media Library /wp-admin/upload.php3.42 ▲0.1330.58 ▲0.43
Documentation /wp-admin/admin.php?page=faposter-doclinks3.2220.59
Check Premium Version /wp-admin/admin.php?page=faposter-premium3.2226.20
Social Auto Poster /wp-admin/admin.php?page=afap3.4541.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 116 new files
Database: 1 new table, 2 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Social Auto Poster
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,802 ▲4415.63 ▲0.726.00 ▲0.292.23 ▼0.39
Dashboard /wp-admin2,928 ▲706.03 ▼0.12118.89 ▼28.74155.37 ▼8.53
Posts /wp-admin/edit.php2,728 ▲433.37 ▲0.1463.96 ▼1.15145.63 ▼66.24
Add New Post /wp-admin/post-new.php1,855 ▲15725.27 ▲2.43412.93 ▼13.72184.88 ▼4.10
Media Library /wp-admin/upload.php1,734 ▲395.52 ▲0.03155.88 ▲0.46191.79 ▲13.10
Documentation /wp-admin/admin.php?page=faposter-doclinks1,2118.25298.57229.31
Check Premium Version /wp-admin/admin.php?page=faposter-premium2,41017.93540.67214.49
Social Auto Poster /wp-admin/admin.php?page=afap2,2518.97187.09214.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_afap_logs
  • Zombie WordPress options detected upon uninstall: 2 options
    • afap_settings
    • afap_extra_settings

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/accesspress-facebook-auto-post/inc/main-page.php
    • > /wp-content/plugins/accesspress-facebook-auto-post/inc/cores/fb-authorization-callback.php
    • > /wp-content/plugins/accesspress-facebook-auto-post/inc/cores/save-settings.php
    • > /wp-content/plugins/accesspress-facebook-auto-post/inc/cores/fb-authorization.php
    • > /wp-content/plugins/accesspress-facebook-auto-post/accesspress-facebook-auto-post.php
    • > /wp-content/plugins/accesspress-facebook-auto-post/inc/header.php
  • 60× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\HttpClients\\FacebookHttpClientInterface' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/HttpClients/FacebookGuzzleHttpClient.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/Exceptions/FacebookAuthenticationException.php:31
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/accesspress-facebook-auto-post/inc/cores/auto-post.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/Exceptions/FacebookAuthorizationException.php:31
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/accesspress-facebook-auto-post/inc/tabs/logs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Url\\UrlDetectionInterface' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/Url/FacebookUrlDetectionHandler.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PersistentData\\PersistentDataInterface' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accesspress-facebook-auto-post/inc/tabs/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNodeFactory' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/GraphNodes/GraphObjectFactory.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/accesspress-facebook-auto-post/api/facebook-mobile/Facebook/Exceptions/FacebookThrottleException.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=faposter-doclinks
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/documentation/accesspress-facebook-auto-post/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=faposter-premium
    • > Network (severe)
    https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=faposter-premium
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/wordpress-plugins/accesspress-social-auto-post/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt might help

accesspress-facebook-auto-post/accesspress-facebook-auto-post.php Passed 13 tests

"Social Auto Poster" version 2.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
80 characters long description:
A plugin to publish your wordpress posts to your facebook profile and fan pages.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/accesspress-facebook-auto-post/api/fb_ca_chain_bundle.crt
9,902 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.97
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
▷ Abstract classes22.70%
▷ Concrete classes7297.30%
▷ Final classes00.00%
▷ Static methods223.64%
▷ Public methods51885.76%
▷ Protected methods6811.26%
▷ Private methods182.98%
▷ Named functions125.00%
▷ Anonymous functions375.00%
▷ Global constants1536.59%
▷ Class constants2663.41%
▷ Public constants26100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.59MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fauto-poster-logo1.png23.93KB4.13KB▼ 82.72%
images/app-id-app-secret.png108.27KB42.08KB▼ 61.14%
images/fauto-poster-logo.png115.67KB4.13KB▼ 96.43%
images/business-type.png97.86KB36.83KB▼ 62.36%
images/theme.png52.01KB17.38KB▼ 66.59%