83% sexy-author-bio

Code Review | WP Author Bio

WordPress plugin WP Author Bio scored 83% from 54 tests.

About plugin

  • Plugin page: sexy-author-bio
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 5.8.1
  • First release: Dec 23, 2013
  • Latest release: Mar 24, 2018
  • Number of updates: 97
  • Update frequency: every 16.0 days
  • Top authors: penguininitiatives (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

2,000+ active / 72,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.86MB] [CPU: ▼137.65ms] Passed 4 tests

Analyzing server-side resources used by WP Author Bio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.9528.99 ▲10.26
Dashboard /wp-admin4.96 ▲1.8944.84 ▲5.92
Posts /wp-admin/edit.php5.01 ▲1.9044.16 ▲4.33
Add New Post /wp-admin/post-new.php7.25 ▲1.8182.18 ▼571.10
Media Library /wp-admin/upload.php4.86 ▲1.8540.83 ▲16.48
Freemius Debug [v.1.2.1.5] /wp-admin/admin.php?page=freemius4.8934.25

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 375 new files
Database: no new tables, 6 new options
New WordPress options
fs_api_cache
widget_sexy_author_bio_widget
sexyauthorbio_settings
fs_debug_mode
fs_active_plugins
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by WP Author Bio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,704 ▲10315.70 ▼0.375.00 ▼0.3374.41 ▲0.80
Dashboard /wp-admin2,965 ▲666.01 ▼0.16114.04 ▼13.64180.36 ▲11.93
Posts /wp-admin/edit.php2,778 ▲353.23 ▼0.0164.02 ▲2.97150.04 ▲8.69
Add New Post /wp-admin/post-new.php3,767 ▼4819.18 ▼0.12417.14 ▼33.49162.01 ▼10.50
Media Library /wp-admin/upload.php1,788 ▲365.46 ▲0.01137.50 ▼17.23201.56 ▲17.55
Freemius Debug [v.1.2.1.5] /wp-admin/admin.php?page=freemius1,4332.4454.71126.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • widget_sexy_author_bio_widget
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • fs_api_cache

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: social in wp-content/plugins/sexy-author-bio/public/icons-standard.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sexy-author-bio/public/icons-standard.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sexy-author-bio/public/icons-coauthor.php on line 3
    • > PHP Notice
      Undefined variable: social in wp-content/plugins/sexy-author-bio/public/icons-coauthor.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fetch_feed() in wp-content/plugins/sexy-author-bio/admin/views/metabox.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (40 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Example WP Author Bio Front-End Display #1), #2 (Example WP Author Bio User Settings), #3 (Example WP Author Bio Display & Design Settings)
You can look at the official readme.txt

sexy-author-bio/sexy-author-bio.php 92% from 13 tests

Analyzing the main PHP file in "WP Author Bio" version 1.5.5
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected21,822 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP853,6588,50215,861
PO File51,4531,5083,734
Sass15267821,636
JavaScript53763230
Markdown2680214
CSS100077
JSON20042
YAML22028

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,019)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity45.13
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes00.00%
Methods690
▷ Static methods9914.35%
▷ Public methods51374.35%
▷ Protected methods142.03%
▷ Private methods16323.62%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants94
▷ Global constants7680.85%
▷ Class constants1819.15%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
238 compressed PNG files occupy 0.52MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/flat-square-rounded/delicious.png0.71KB0.69KB▼ 1.80%
public/assets/images/shadow-circle/google.png2.63KB2.70KB0.00%
public/assets/images/shadow-square/sabyahoo.png2.08KB2.09KB0.00%
public/assets/images/shadow-square/facebook.png2.00KB2.03KB0.00%
public/assets/images/shadow-square/wordpress.png2.49KB2.53KB0.00%