10% social-autho-bio

Code Review | Social Author Bio

WordPress plugin Social Author Bio scored10%from 54 tests.

About plugin

  • Plugin page: social-autho-bio
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2011
  • Latest release: Nov 18, 2012
  • Number of updates: 40
  • Update frequency: every 10.4 days
  • Top authors: nickpowers (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /40,171 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+55
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor

Server metrics [RAM: ▼1.42MB] [CPU: ▼51.61ms] Passed 4 tests

Analyzing server-side resources used by Social Author Bio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.56 ▼0.895.73 ▼35.10
Dashboard /wp-admin2.58 ▼0.727.40 ▼41.92
Posts /wp-admin/edit.php2.59 ▼0.777.77 ▼38.76
Add New Post /wp-admin/post-new.php2.59 ▼3.307.79 ▼90.66
Media Library /wp-admin/upload.php2.59 ▼0.647.46 ▼26.88
General /wp-admin/admin.php?page=sabp-general2.598.13
Custom Links /wp-admin/admin.php?page=sabp-customlinks2.599.33
Advanced HTML/Style /wp-admin/admin.php?page=sabp-html2.596.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Social Author Bio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.20 ▼1.181.71 ▼0.2041.21 ▼9.64
Dashboard /wp-admin2,236 ▲485.84 ▲0.0598.72 ▼4.8673.73 ▲34.14
Posts /wp-admin/edit.php2,119 ▲302.04 ▼0.0238.14 ▲4.1635.93 ▲3.26
Add New Post /wp-admin/post-new.php6,480 ▲4,96128.53 ▲5.29965.22 ▲262.6458.84 ▼2.69
Media Library /wp-admin/upload.php1,415 ▲334.14 ▼0.07111.77 ▲9.6344.03 ▲0.42
General /wp-admin/admin.php?page=sabp-general1,0222.0424.8147.05
Custom Links /wp-admin/admin.php?page=sabp-customlinks1,2792.2125.6827.35
Advanced HTML/Style /wp-admin/admin.php?page=sabp-html8562.0123.9124.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+55
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+55
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Warning in wp-content/plugins/social-autho-bio/social_author_bio.php+68
    count(): Parameter must be an array or an object that implements Countable
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPAlchemy_MetaBox::_global_head() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+1510
    Non-static method WPAlchemy_MetaBox::_is_post() should not be called statically
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+1005
    Non-static method WPAlchemy_MetaBox::_is_post_or_page() should not be called statically
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+1024
    Non-static method WPAlchemy_MetaBox::_get_current_post_type() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-content/plugins/social-autho-bio/include/php/MetaBox.php+1510
    Non-static method WPAlchemy_MetaBox::_is_page() should not be called statically
    • > GET request to /wp-admin/admin.php?page=sabp-general
    • > Notice in wp-content/plugins/social-autho-bio/social_author_bio.php+300
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=sabp-general
    • > Notice in wp-content/plugins/social-autho-bio/social_author_bio.php+300
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sabp-html
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPAlchemy_MetaBox::_global_foot() should not be called statically

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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-autho-bio/include/php/MetaBox.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_field() on null in wp-content/plugins/social-autho-bio/include/php/checkbox-meta.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-autho-bio/social_author_bio.php:11
    • > PHP Notice
      Undefined variable: mb in wp-content/plugins/social-autho-bio/include/php/checkbox-meta.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Social Author Bio in Action!), #2 (Social Author Bio General Admin Settings), #3 (Social Author Bio Custom Social Icons), #4 (Social Author Bio HTML Settings), #5 (Social Author Bio User Profile Settings)
Please take inspiration from this readme.txt

social-autho-bio/social_author_bio.php 92% from 13 tests

The main file in "Social Author Bio" v. 2.4 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: The principal plugin file should be the same as the plugin slug ("social-autho-bio.php" instead of "social_author_bio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,137 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46798502,137

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity121.33
▷ Minimum class complexity5.00
▷ Maximum class complexity237.00
Average method complexity5.46
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods8098.77%
▷ Protected methods00.00%
▷ Private methods11.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 0.34MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Wordpress.png3.05KB1.73KB▼ 43.21%
images/Linkedin.png2.53KB1.68KB▼ 33.83%
images/Vimeo.png2.40KB1.71KB▼ 28.84%
images/Technorati.png2.50KB1.62KB▼ 35.18%
screenshot-4.png41.89KB19.42KB▼ 53.64%