84% wp-latest-posts-widget-with-thumbnails

Code Review | WP Latest Posts Widget With Thumbnails

WordPress plugin WP Latest Posts Widget With Thumbnails scored 84% from 54 tests.

About plugin

  • Plugin page: wp-latest-posts-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.3
  • WordPress version: 5.9.2
  • First release: Dec 8, 2020
  • Latest release: Dec 8, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: arafatrahmanbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 786 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by WP Latest Posts Widget With Thumbnails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0453.01 ▲1.66
Dashboard /wp-admin3.44 ▲0.0333.05 ▼0.86
Posts /wp-admin/edit.php3.68 ▲0.0337.10 ▼0.35
Add New Post /wp-admin/post-new.php6.92 ▼0.0596.68 ▼1,182.80
Media Library /wp-admin/upload.php3.33 ▲0.0326.40 ▲1.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
widget_kau-latest-post

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Latest Posts Widget With Thumbnails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5115.89 ▲0.226.31 ▲0.642.29 ▲0.05
Dashboard /wp-admin2,892 ▲316.17 ▲0.06120.30 ▼24.77155.52 ▼9.65
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0161.73 ▼1.51140.79 ▼3.69
Add New Post /wp-admin/post-new.php1,752 ▲9120.93 ▲4.47483.50 ▲68.30164.89 ▲9.20
Media Library /wp-admin/upload.php1,701 ▲95.53 ▲0.00148.07 ▼1.28191.60 ▼5.30

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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_kau-latest-post

Smoke tests 75% from 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 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-latest-posts-widget-with-thumbnails/classes/recent-post-widget-with-thumbnail.php:4

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: recent post widget, latest post widget, recent post widget with thumbnails, wp recent post, latest post...

wp-latest-posts-widget-with-thumbnails/kau-latest-posts-widget.php 85% from 13 tests

The primary PHP file in "WP Latest Posts Widget With Thumbnails" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-latest-posts-widget-with-thumbnails.php" instead of "kau-latest-posts-widget.php")

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 detected138 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22510107
CSS15031

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin