84% smart-author-box

Code Review | Smart Author Box

WordPress plugin Smart Author Box scored 84% from 54 tests.

About plugin

  • Plugin page: smart-author-box
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Jul 3, 2022
  • Number of updates: 15
  • Update frequency: every 71.3 days
  • Top authors: wpxon (86.67%)stalukder03 (20%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,230 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.95ms] Passed 4 tests

Analyzing server-side resources used by Smart Author Box
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1045.68 ▲7.21
Dashboard /wp-admin3.37 ▲0.0750.51 ▲3.08
Posts /wp-admin/edit.php3.49 ▲0.1350.96 ▼0.12
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.91 ▼14.76
Media Library /wp-admin/upload.php3.27 ▲0.0536.99 ▲4.01
Settings /wp-admin/admin.php?page=wpxon_sab_settings3.2937.64
Smart Author Box /wp-admin/admin.php?page=wpxon_sab3.3134.48

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
sab_style_one
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Smart Author Box: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,097 ▲36215.37 ▲0.995.30 ▲3.5439.76 ▼5.93
Dashboard /wp-admin2,393 ▲2086.62 ▲0.74134.80 ▲0.9039.15 ▼5.85
Posts /wp-admin/edit.php2,293 ▲2013.52 ▲1.5356.71 ▲16.5134.98 ▼1.63
Add New Post /wp-admin/post-new.php1,711 ▲19222.53 ▼0.78564.49 ▼120.5629.01 ▼23.26
Media Library /wp-admin/upload.php1,429 ▲414.40 ▲0.1683.22 ▼25.3141.13 ▼2.89
Settings /wp-admin/admin.php?page=wpxon_sab_settings1,4063.8981.1628.27
Smart Author Box /wp-admin/admin.php?page=wpxon_sab1,0593.3346.1226.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • sab_style_one
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_author_meta() in wp-content/plugins/smart-author-box/public/partials/smart-author-box-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/smart-author-box/admin/partials/smart-author-box-admin-about.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/smart-author-box/admin/partials/smart-author-box-admin-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: author box, author bio, smart author bio, smart author box

smart-author-box/smart-author-box.php Passed 13 tests

The entry point to "Smart Author Box" version 1.0.6 is a PHP file that has certain tags in its header comment area
65 characters long description:
Smart Author Box will show the author's biography below articles.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin6,471 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,959
CSS3733182,539
PHP16305749931
JavaScript218742

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.30
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods67
▷ Static methods22.99%
▷ Public methods6292.54%
▷ Protected methods00.00%
▷ Private methods57.46%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/screenshot-2.png36.42KB17.76KB▼ 51.22%
public/img/screenshot-1.png39.46KB12.37KB▼ 68.66%
public/img/screenshot-3.png31.84KB16.55KB▼ 48.01%