78% posts-slideshow-widget

Code Review | Posts Slideshow Widget

WordPress plugin Posts Slideshow Widget scored 78% from 53 tests.

About plugin

  • Plugin page: posts-slideshow-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 26, 2013
  • Latest release: Apr 26, 2013
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: apgossips (100%)

Code review

53 tests

User reviews

5 reviews

Install metrics

100+ active / 10,013 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼257.65ms] Passed 4 tests

An overview of server-side resources used by Posts Slideshow Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.2938.29 ▲15.31
Dashboard /wp-admin3.23 ▲0.1752.90 ▲11.35
Posts /wp-admin/edit.php3.34 ▲0.2342.77 ▼2.62
Add New Post /wp-admin/post-new.php5.59 ▲0.1692.13 ▼1,031.75
Media Library /wp-admin/upload.php3.17 ▲0.1632.51 ▼7.56

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 2 new options
New WordPress options
widget_posts_slideshow_widget
posts_slideshow_widget

Browser metrics Passed 4 tests

Checking browser requirements for Posts Slideshow Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲18216.09 ▲0.5313.05 ▲1.9049.86 ▲3.24
Dashboard /wp-admin2,929 ▲765.99 ▲0.16142.51 ▲14.29115.49 ▲9.47
Posts /wp-admin/edit.php2,711 ▲52.68 ▼0.0064.33 ▼2.5095.82 ▼2.04
Add New Post /wp-admin/post-new.php1,856 ▲319.06 ▼0.07356.52 ▼17.84106.88 ▲3.44
Media Library /wp-admin/upload.php1,780 ▲55.01 ▼0.00152.02 ▲10.91112.46 ▼6.62
Posts Slideshow /wp-admin/posts-slideshow-widget.php260.900.5310.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_posts_slideshow_widget

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/posts-slideshow-widget/includes/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-slideshow-widget/includes/class-posts-slideshow-widget.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/posts-slideshow-widget.php
    • > Network (severe)
    wp-admin/posts-slideshow-widget.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png Posts Slideshow Widget in action.), #2 (screenshot-2.png Posts Slideshow Widget plugin global Settings page.), #3 (screenshot-3.png Posts Slideshow Widget plugin widget options.)
Please take inspiration from this readme.txt

posts-slideshow-widget/posts-slideshow-widget.php Passed 13 tests

The main file in "Posts Slideshow Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
94 characters long description:
Side bar widget with slider (slideshow) of featured images from posts from a selected category

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,184 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8273299993
PO File1424889
CSS2202369
JavaScript101033

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity39.00
▷ Minimum class complexity16.00
▷ Maximum class complexity51.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3175.61%
▷ Protected methods00.00%
▷ Private methods1024.39%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/image-not-found-300x300.png3.45KB1.74KB▼ 49.53%
screenshot-3.png36.74KB12.99KB▼ 64.65%
screenshot-2.png30.04KB10.30KB▼ 65.72%
screenshot-1.png126.50KB46.58KB▼ 63.18%
js/flexslider/images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%