89% smart-author-bio-widget

Code Review | Smart Author Bio Widget

WordPress plugin Smart Author Bio Widget scored89%from 54 tests.

About plugin

  • Plugin page: smart-author-bio-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: May 15, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: ikamal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /461 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.73ms] Passed 4 tests

Server-side resources used by Smart Author Bio Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.32 ▼2.06
Dashboard /wp-admin3.38 ▲0.0354.32 ▼13.95
Posts /wp-admin/edit.php3.50 ▲0.1453.54 ▼3.80
Add New Post /wp-admin/post-new.php5.97 ▲0.0787.00 ▼11.12
Media Library /wp-admin/upload.php3.29 ▲0.0537.88 ▲0.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Smart Author Bio Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲18814.35 ▼0.001.89 ▲0.2342.08 ▼4.76
Dashboard /wp-admin2,334 ▲1576.16 ▲0.62105.60 ▲6.1239.05 ▼6.67
Posts /wp-admin/edit.php2,270 ▲1673.39 ▲1.4151.05 ▲16.5731.23 ▼4.36
Add New Post /wp-admin/post-new.php1,528 ▲223.38 ▼0.13579.37 ▼98.5335.10 ▼17.02
Media Library /wp-admin/upload.php1,407 ▲74.15 ▼0.0485.17 ▼17.2743.72 ▼4.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_author_bio
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Widget Configuration), #2 (Change widget fields options), #3 (Front-end result)
You can look at the official readme.txt

smart-author-bio-widget/smart-author-widget.php 77% from 13 tests

Analyzing the main PHP file in "Smart Author Bio Widget" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-author-bio-widget.php" instead of "smart-author-widget.php")
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,804 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG2043,567
PHP12534181
CSS351033
JavaScript111423

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 1.73MB with 1.37MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png665.63KB132.31KB▼ 80.12%
screenshot-2.png666.88KB136.74KB▼ 79.50%
screenshot-3.png435.45KB93.61KB▼ 78.50%