10% recent-post-thumbnail-slider-widget

Code Review | Recent Post Thumbnail Slider Widget

WordPress plugin Recent Post Thumbnail Slider Widget scored10%from 54 tests.

About plugin

  • Plugin page: recent-post-thumb...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: May 5, 2013
  • Latest release: Sep 18, 2013
  • Number of updates: 4
  • Update frequency: every 34.0 days
  • Top authors: kundanyevale (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /22,036 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/recent-post-thumbnail-slider-widget/recent-posts-slider-widget.php+347
    Function create_function() is deprecated

Server metrics [RAM: ▼1.80MB] [CPU: ▼55.65ms] Passed 4 tests

Server-side resources used by Recent Post Thumbnail Slider Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.57 ▼34.84
Dashboard /wp-admin2.20 ▼1.107.46 ▼42.84
Posts /wp-admin/edit.php2.20 ▼1.156.16 ▼41.51
Add New Post /wp-admin/post-new.php2.20 ▼3.685.60 ▼103.39
Media Library /wp-admin/upload.php2.20 ▼1.035.35 ▼26.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts-thumbnail-slider
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Recent Post Thumbnail Slider Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.64 ▼0.924.88 ▲3.1039.86 ▼5.54
Dashboard /wp-admin2,206 ▲185.88 ▲1.01104.02 ▼7.1138.69 ▼2.48
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0134.84 ▲0.1130.75 ▼3.23
Add New Post /wp-admin/post-new.php1,519 ▼1423.08 ▼0.10672.50 ▼25.8555.29 ▲0.82
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.1097.73 ▼13.5343.89 ▼4.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/recent-post-thumbnail-slider-widget/recent-posts-slider-widget.php+347
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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 no errors were found, this is by no means 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 take a closer look at the following
  • 2× 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/recent-post-thumbnail-slider-widget/recent-posts-slider-widget-display.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recent-post-thumbnail-slider-widget/recent-posts-slider-widget-display.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: slider widget, post thumbnail slider, sidebar thumbnail slider

recent-post-thumbnail-slider-widget/recent-posts-slider-widget.php 85% from 13 tests

"Recent Post Thumbnail Slider Widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("recent-post-thumbnail-slider-widget.php" instead of "recent-posts-slider-widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 235 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin965 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17027630
PHP27314290
CSS112045

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity11.25
▷ Minimum method complexity1.00
▷ Maximum method complexity23.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%
Functions3
▷ Named functions3100.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
12 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/left.png1.36KB0.94KB▼ 31.13%
img/right222.png0.57KB0.51KB▼ 10.75%
img/left11.png2.55KB1.47KB▼ 42.23%
img/left_bk.png0.57KB0.51KB▼ 10.77%
img/left(2).png0.32KB0.31KB▼ 4.83%