83% jwd-postslider-widget

Code Review | JWD PostSlider Widget

WordPress plugin JWD PostSlider Widget scored83%from 54 tests.

About plugin

  • Plugin page: jwd-postslider-wi...
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2016
  • Latest release: Jul 9, 2020
  • Number of updates: 121
  • Update frequency: every 10.7 days
  • Top authors: jordachewd (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /5,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▲0.88ms] Passed 4 tests

This is a short check of server-side resources used by JWD PostSlider Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.61 ▼0.34
Dashboard /wp-admin3.68 ▲0.3750.65 ▲2.74
Posts /wp-admin/edit.php3.79 ▲0.4351.07 ▲1.50
Add New Post /wp-admin/post-new.php6.28 ▲0.3990.54 ▼0.39
Media Library /wp-admin/upload.php3.60 ▲0.3744.24 ▲12.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
jwdsp_general_settings
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_jwdsp_postslider

Browser metrics Passed 4 tests

An overview of browser requirements for JWD PostSlider Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.20 ▼1.251.59 ▼0.5440.84 ▼1.93
Dashboard /wp-admin2,222 ▲375.91 ▲0.10101.61 ▼18.4843.66 ▼0.62
Posts /wp-admin/edit.php2,105 ▲192.02 ▲0.0039.95 ▲3.7135.38 ▼2.09
Add New Post /wp-admin/post-new.php6,246 ▲4,72718.65 ▼4.54932.02 ▲257.9674.09 ▲21.21
Media Library /wp-admin/upload.php1,407 ▲194.21 ▲0.05100.80 ▼0.6552.13 ▲6.05

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
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • jwdsp_general_settings
    • widget_jwdsp_postslider
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_metabox.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_widget.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_ajax.php
    • > /wp-content/plugins/jwd-postslider-widget/jwd_postslider.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_enqueue.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_admin_page.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_deprecated.php
    • > /wp-content/plugins/jwd-postslider-widget/inc/jwdsp_hooks.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 32 tag instead of maximum 10
The official readme.txt might help

jwd-postslider-widget/jwd_postslider.php 85% from 13 tests

The primary PHP file in "JWD PostSlider Widget" version 1.8.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jwd-postslider-widget.php" instead of "jwd_postslider.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected4,719 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PO File98749321,975
PHP812891,470
CSS464142798
JavaScript7048249
SVG651227

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity135.00
▷ Minimum class complexity135.00
▷ Maximum class complexity135.00
Average method complexity34.50
▷ Minimum method complexity1.00
▷ Maximum method complexity58.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%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin