89% list-of-users-posts-widget

Code Review | List of User's Posts Widget

WordPress plugin List of User's Posts Widget scored89%from 54 tests.

About plugin

  • Plugin page: list-of-users-pos...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Feb 9, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Victor Demianenko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.51ms] Passed 4 tests

Server-side resources used by List of User's Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0237.61 ▼10.55
Dashboard /wp-admin3.32 ▲0.0147.83 ▼5.36
Posts /wp-admin/edit.php3.37 ▲0.0148.24 ▲0.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.55 ▼1.91
Media Library /wp-admin/upload.php3.24 ▲0.0134.71 ▼0.23

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_list-of-user-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

List of User's Posts Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.071.69 ▼0.2341.26 ▼2.81
Dashboard /wp-admin2,206 ▲184.84 ▼0.05107.27 ▼6.9640.18 ▼4.76
Posts /wp-admin/edit.php2,092 ▲62.06 ▲0.0638.99 ▲1.1735.14 ▼0.51
Add New Post /wp-admin/post-new.php1,521 ▲223.40 ▲0.21606.01 ▼75.5758.16 ▲4.76
Media Library /wp-admin/upload.php1,382 ▼64.29 ▲0.0895.23 ▼7.1542.09 ▼2.35

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_list-of-user-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Displayed only for authorized users), #2 (No displayed for unauthorized users), #3 (Settings of the number of posts in the list. Settings showing / hiding the dates of posts. Support for any custom [shortcodes])
You can look at the official readme.txt

list-of-users-posts-widget/louposts.php 92% from 13 tests

"List of User's Posts Widget" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("list-of-users-posts-widget.php" instead of "louposts.php")

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 detected116 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13347116

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png53.23KB23.41KB▼ 56.02%
screenshot-1.png61.77KB26.60KB▼ 56.93%
screenshot-3.png30.86KB15.07KB▼ 51.15%