10% raw-latest-posts-widget

Code Review | Latest Posts Widget

WordPress plugin Latest Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: raw-latest-posts-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 9, 2014
  • Latest release: Oct 13, 2014
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: ravidhu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /2,301 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/raw-latest-posts-widget/raw-latest-posts-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; raw_lp_widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼46.64ms] Passed 4 tests

This is a short check of server-side resources used by Latest Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.52 ▼32.15
Dashboard /wp-admin2.29 ▼1.0112.80 ▼34.60
Posts /wp-admin/edit.php2.29 ▼1.069.73 ▼37.44
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.21 ▼82.38
Media Library /wp-admin/upload.php2.29 ▼0.9410.20 ▼23.76

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_raw_lp_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Latest Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.69 ▼0.874.63 ▲2.6843.52 ▼1.84
Dashboard /wp-admin2,203 ▲125.84 ▲0.9395.27 ▼6.0037.27 ▼4.30
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.05 ▼0.4834.18 ▼0.64
Add New Post /wp-admin/post-new.php1,533 ▲523.38 ▲5.26666.22 ▲36.8254.22 ▼1.27
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0495.03 ▼3.4640.09 ▼4.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in raw_lp_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_raw_lp_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raw-latest-posts-widget/raw-latest-posts-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === raw-latest-posts-widget === )
Please take inspiration from this readme.txt

raw-latest-posts-widget/raw-latest-posts-widget.php Passed 13 tests

"Latest Posts Widget" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
List the lastest posts from a category with the possibility to display an excerpt and/or date

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
Success! There were no dangerous files found in this plugin190 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1609190

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity7.80
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected