68% automatic-post-share

Code Review | Automatic Post Share

WordPress plugin Automatic Post Share scored68%from 54 tests.

About plugin

  • Plugin page: automatic-post-share
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2013
  • Latest release: Dec 12, 2013
  • Number of updates: 34
  • Update frequency: every 0.2 days
  • Top authors: racase (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.51ms] Passed 4 tests

This is a short check of server-side resources used by Automatic Post Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2141.30 ▼2.63
Dashboard /wp-admin3.58 ▲0.2751.20 ▲3.19
Posts /wp-admin/edit.php3.63 ▲0.2746.57 ▼2.17
Add New Post /wp-admin/post-new.php6.09 ▲0.2192.78 ▲1.65
Media Library /wp-admin/upload.php3.44 ▲0.2137.55 ▲1.10
APS Settings /wp-admin/options-general.php?page=aps-setting3.4032.20

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Automatic Post Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.24 ▼1.131.96 ▼0.0444.39 ▼1.54
Dashboard /wp-admin2,210 ▲224.89 ▼1.00114.91 ▼4.5143.08 ▲1.21
Posts /wp-admin/edit.php2,093 ▼02.03 ▼0.0135.11 ▼12.1132.51 ▼7.97
Add New Post /wp-admin/post-new.php1,536 ▲1722.14 ▼1.12672.83 ▼8.9854.71 ▲4.45
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.05101.55 ▼20.1845.53 ▼3.12
APS Settings /wp-admin/options-general.php?page=aps-setting8122.0625.3028.85

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=aps-setting
    • > Notice in wp-content/plugins/automatic-post-share/lib/facebook/fb_wrapper.php+94
    Trying to access array offset on value of type bool

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/automatic-post-share/automatic-post-share.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/automatic-post-share/templates/template-setting.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: share, social, facebook

automatic-post-share/automatic-post-share.php Passed 13 tests

Analyzing the main PHP file in "Automatic Post Share" version 1.2
76 characters long description:
A simple wordpress plugin to share post automatically while saving new post.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/automatic-post-share/lib/facebook/fb_ca_chain_bundle.crt
1,205 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP72226981,205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.86
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods90
▷ Static methods77.78%
▷ Public methods4853.33%
▷ Protected methods4246.67%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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