10% microblog-poster

Code Review | Microblog Poster - Auto Publish on Social Media

WordPress plugin Microblog Poster - Auto Publish on Social Media scored10%from 54 tests.

About plugin

  • Plugin page: microblog-poster
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Dec 30, 2011
  • Latest release: Aug 31, 2021
  • Number of updates: 1,698
  • Update frequency: every 2.1 days
  • Top authors: cybperic (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

2,000+ active /375,199 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/microblog-poster/microblogposter_oauth.php+101
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.26MB] [CPU: ▼51.51ms] Passed 4 tests

An overview of server-side resources used by Microblog Poster - Auto Publish on Social Media
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2810.40 ▼28.50
Dashboard /wp-admin3.77 ▲0.4212.15 ▼51.01
Posts /wp-admin/edit.php3.77 ▲0.4112.29 ▼40.48
Add New Post /wp-admin/post-new.php3.77 ▼2.1211.21 ▼86.03
Media Library /wp-admin/upload.php3.77 ▲0.5310.50 ▼23.89

Server storage [IO: ▲2.15MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 103 new files
Database: 5 new tables, 7 new options
New tables
wp_microblogposter_accounts
wp_microblogposter_logs
wp_microblogposter_user_accounts
wp_microblogposter_items_meta
wp_microblogposter_old_items
New WordPress options
microblogposter_who_can_auto_publish
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Microblog Poster - Auto Publish on Social Media
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.26 ▼1.054.42 ▲2.7238.19 ▼1.63
Dashboard /wp-admin2,210 ▲255.81 ▼0.0498.16 ▼0.7038.64 ▼5.89
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0041.10 ▼1.4736.28 ▲1.18
Add New Post /wp-admin/post-new.php6,251 ▲4,72326.07 ▲7.97987.56 ▲362.2760.47 ▼1.63
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.11101.81 ▼2.1044.26 ▲0.06
Microblog Poster /wp-admin/microblogposter.php260.440.1113.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/microblog-poster/microblogposter_oauth.php+101
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_microblogposter_items_meta
    • wp_microblogposter_user_accounts
    • wp_microblogposter_logs
    • wp_microblogposter_accounts
    • wp_microblogposter_old_items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • microblogposter_who_can_auto_publish
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_gmb.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/microblog-poster/microblogposter.php:6150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_bff.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_lk.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/microblog-poster/options/microblogposter_options_new.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_dg.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/microblog-poster/microblogposter_options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_fbb.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_pt.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/microblog-poster/options/microblogposter_options_vk.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/microblogposter.php
    • > Network (severe)
    wp-admin/microblogposter.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 29 tag instead of maximum 10
You can look at the official readme.txt

microblog-poster/microblogposter.php 92% from 13 tests

The main file in "Microblog Poster - Auto Publish on Social Media" v. 2.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("microblog-poster.php" instead of "microblogposter.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin24,022 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,43696113,150
PO File113,5624,9219,150
JavaScript4293125872
CSS25633850

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,045)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity62.21
▷ Minimum class complexity1.00
▷ Maximum class complexity1,045.00
Average method complexity7.19
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes00.00%
Methods192
▷ Static methods10454.17%
▷ Public methods16887.50%
▷ Protected methods21.04%
▷ Private methods2211.46%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
44 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/friendfeed_icon.png3.96KB1.30KB▼ 67.26%
images/twitter_icon.png4.06KB1.32KB▼ 67.59%
images/adfly_icon.png3.89KB1.33KB▼ 65.75%
images/googlemybusinessl_icon.png0.88KB1.23KB0.00%
images/buffer_icon.png0.40KB0.52KB0.00%