89% authors-posts-widget

Code Review | Authors Posts Widget

WordPress plugin Authors Posts Widget scored 89% from 53 tests.

About plugin

  • Plugin page: authors-posts-widget
  • Plugin version: 1.3.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 5.8.1
  • First release: Nov 21, 2013
  • Latest release: Sep 16, 2021
  • Number of updates: 42
  • Update frequency: every 68.0 days
  • Top authors: fahadmahmood (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

200+ active / 5,429 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼277.49ms] Passed 4 tests

This is a short check of server-side resources used by Authors Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2640.50 ▲17.56
Dashboard /wp-admin3.10 ▲0.0443.02 ▲3.23
Posts /wp-admin/edit.php3.15 ▲0.0444.08 ▲2.90
Add New Post /wp-admin/post-new.php5.46 ▲0.0390.82 ▼1,103.91
Media Library /wp-admin/upload.php3.04 ▲0.0326.42 ▼12.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Authors Posts Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲17816.28 ▲0.9411.30 ▲1.9048.33 ▼2.44
Dashboard /wp-admin2,950 ▲1006.06 ▲0.24147.76 ▲15.25109.89 ▲6.84
Posts /wp-admin/edit.php2,706 ▼02.69 ▼0.0166.57 ▼3.0974.83 ▼17.89
Add New Post /wp-admin/post-new.php1,853 ▲20018.90 ▲0.06384.29 ▲13.39122.38 ▲12.19
Media Library /wp-admin/upload.php1,775 ▲35.01 ▼0.02168.36 ▼1.19109.43 ▼39.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_apw_authors

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 everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #3 (Log in to the WordPress Dashboard and activate the Authors Posts Widget plugin.), #4 (Once the plugin is activated, a new **Authors Posts Widget** will appear in your Wordpress admin -> appearance -> widgets.)
You can look at the official readme.txt

authors-posts-widget/index.php 92% from 13 tests

The main PHP script in "Authors Posts Widget" version 1.3.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("authors-posts-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected233 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PO File3151578

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/black-plus.png0.32KB0.29KB▼ 7.12%