89% authors-posts-widget

Code Review | Authors Posts Widget

WordPress plugin Authors Posts Widget scored89%from 54 tests.

About plugin

  • Plugin page: authors-posts-widget
  • Plugin version: 1.3.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: May 1, 2023
  • Number of updates: 43
  • Update frequency: every 80.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.40ms] Passed 4 tests

Server-side resources used by Authors Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1540.31 ▼3.00
Dashboard /wp-admin3.32 ▲0.0250.29 ▲1.76
Posts /wp-admin/edit.php3.37 ▲0.0244.05 ▼4.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.54 ▼13.74
Media Library /wp-admin/upload.php3.25 ▲0.0232.75 ▼4.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_apw_authors
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Authors Posts Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.68 ▼0.678.65 ▲6.8142.91 ▼0.74
Dashboard /wp-admin2,198 ▲215.63 ▲0.0583.09 ▼8.9836.86 ▲1.29
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0235.33 ▼0.9633.48 ▼1.65
Add New Post /wp-admin/post-new.php1,534 ▲818.32 ▼5.41594.73 ▼75.3668.10 ▲16.37
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0894.36 ▼28.6942.03 ▼9.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_apw_authors
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #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.)
The official readme.txt is a good inspiration

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

"Authors Posts Widget" version 1.3.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file 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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected233 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP34330101
PO File3151578
CSS11143
JavaScript12011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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%
images/black-minus.png0.27KB0.29KB0.00%