90% wp-posts-widget

Code Review | WP Post Widget

WordPress plugin WP Post Widget scored90%from 54 tests.

About plugin

  • Plugin page: wp-posts-widget
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Nov 14, 2023
  • Number of updates: 30
  • Update frequency: every 87.2 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,207 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.10ms] Passed 4 tests

Analyzing server-side resources used by WP Post Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.46 ▼0.20
Dashboard /wp-admin3.41 ▲0.0645.35 ▼15.90
Posts /wp-admin/edit.php3.46 ▲0.1047.90 ▲6.62
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.91 ▼10.84
Media Library /wp-admin/upload.php3.33 ▲0.1033.90 ▲2.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_wp_posts_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

WP Post Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4314.72 ▲0.352.00 ▲0.0345.64 ▲2.32
Dashboard /wp-admin2,195 ▲185.69 ▼0.0191.16 ▲2.8839.01 ▼6.35
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0039.25 ▲0.2435.73 ▲0.11
Add New Post /wp-admin/post-new.php1,530 ▲423.15 ▼0.22609.60 ▼42.5451.91 ▼2.45
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.0396.66 ▼2.4043.93 ▲0.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_wp_posts_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: custom post type widget, post widget, post type widget, recent posts, sticky posts...

wp-posts-widget/wp-posts-widget.php 92% from 13 tests

Analyzing the main PHP file in "WP Post Widget" version 1.8
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected323 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26166323

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity90.00
▷ Minimum class complexity90.00
▷ Maximum class complexity90.00
Average method complexity13.71
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin