84% simple-author-box

Code Review | Simple Author Box

WordPress plugin Simple Author Box scored84%from 54 tests.

About plugin

  • Plugin page: simple-author-box
  • Plugin version: 2.52
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: Aug 10, 2023
  • Number of updates: 179
  • Update frequency: every 18.4 days
  • Top authors: machothemes (32.4%)WebFactory (31.84%)tiguan (26.26%)GreenTreeLabs (10.06%)giucu91 (1.68%)

Code review

54 tests

User reviews

108 reviews

Install metrics

60,000+ active /1,227,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.99MB] [CPU: ▲2.79ms] Passed 4 tests

Server-side resources used by Simple Author Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲0.7353.53 ▲11.67
Dashboard /wp-admin4.67 ▲1.1065.28 ▲10.96
Posts /wp-admin/edit.php4.72 ▲1.0458.86 ▲1.67
Add New Post /wp-admin/post-new.php7.27 ▲1.12104.43 ▼12.74
Media Library /wp-admin/upload.php4.59 ▲1.1053.45 ▲11.25
Simple Author Box /wp-admin/themes.php?page=simple-author-box5.4088.45

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 8 new options
New WordPress options
sab_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_simple_author_box_widget_lite
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Simple Author Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲17113.57 ▼0.748.87 ▲6.7944.47 ▼5.57
Dashboard /wp-admin2,256 ▲795.80 ▲0.1792.05 ▲0.7741.16 ▼3.53
Posts /wp-admin/edit.php2,167 ▲672.54 ▲0.4847.66 ▲4.3335.38 ▼6.95
Add New Post /wp-admin/post-new.php6,410 ▲4,86522.59 ▼0.28957.93 ▲342.8741.99 ▼7.13
Media Library /wp-admin/upload.php1,464 ▲674.38 ▲0.20113.25 ▲8.3046.85 ▲0.48
Simple Author Box /wp-admin/themes.php?page=simple-author-box15,5914.15197.57224.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_simple_author_box_widget_lite
    • sab_version
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-author-box/simple-author-box.php on line 37
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/simple-author-box/simple-author-box.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/simple-author-box/template/template-sab.php:26
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-author-box/simple-author-box.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-author-box/inc/class-simple-author-box-user-profile.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-author-box/inc/class-simple-author-box-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The primary PHP file in "Simple Author Box" version 2.52 is used by WordPress to initiate all plugin functionality
59 characters long description:
Adds a responsive author box with social icons on any post.

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
There were no executable files found in this plugin10,701 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP176722764,838
JavaScript144671873,436
CSS8398382,077
Sass130337
JSON10013

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.41
Average class complexity44.33
▷ Minimum class complexity3.00
▷ Maximum class complexity145.00
Average method complexity6.31
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods98
▷ Static methods2020.41%
▷ Public methods8788.78%
▷ Protected methods33.06%
▷ Private methods88.16%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
assets/css/images/ui-icons_cc0000_256x240.png3.19KB3.49KB0.00%
wf-flyout/icons/wp-ssl.png13.01KB6.69KB▼ 48.56%
assets/css/images/ui-icons_ffffff_256x240.png3.19KB3.49KB0.00%
assets/img/image.png0.56KB0.41KB▼ 26.13%