84% simple-author-widget

Code Review | Simple Author Widget

WordPress plugin Simple Author Widget scored84%from 54 tests.

About plugin

  • Plugin page: simple-author-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2014
  • Latest release: Aug 21, 2015
  • Number of updates: 7
  • Update frequency: every 84.1 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,087 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.37ms] Passed 4 tests

Analyzing server-side resources used by Simple Author Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.75 ▲4.69
Dashboard /wp-admin3.34 ▲0.0449.19 ▼9.68
Posts /wp-admin/edit.php3.40 ▲0.0348.81 ▼11.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0385.32 ▼16.24
Media Library /wp-admin/upload.php3.27 ▲0.0335.34 ▲0.05

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_buffercode_simple_author_info

Browser metrics Passed 4 tests

Checking browser requirements for Simple Author Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.18 ▼0.182.05 ▲0.4241.30 ▼1.71
Dashboard /wp-admin2,198 ▲215.57 ▼0.0287.40 ▼17.0542.24 ▼2.55
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0042.72 ▲6.4338.07 ▲2.02
Add New Post /wp-admin/post-new.php1,526 ▼023.54 ▼0.13687.66 ▼7.0255.68 ▼5.11
Media Library /wp-admin/upload.php1,397 ▼34.13 ▼0.0597.43 ▼9.8544.97 ▼2.59

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 does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_buffercode_simple_author_info

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
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-author-widget/simple-author-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Simple Author Output Screen), #2 (Widget Selection), #3 (Social networking profile page)
The official readme.txt is a good inspiration

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

The main PHP script in "Simple Author Widget" version 1.1 is automatically included on every request by WordPress
89 characters long description:
Easy way to display the Author profile with four social networking profiles using widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12311158
CSS14229

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.55KB3.34KB▼ 48.95%
screenshot-3.png33.37KB15.09KB▼ 54.77%
image/gp.png4.23KB1.44KB▼ 65.93%
image/fb.png3.35KB0.69KB▼ 79.31%
screenshot-1.png12.28KB4.87KB▼ 60.34%