83% latest-post-shortcode-slider-extension

Code Review | Latest Post Shortcode Slider

WordPress plugin Latest Post Shortcode Slider scored 83% from 54 tests.

About plugin

  • Plugin page: latest-post-short...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Oct 18, 2017
  • Number of updates: 12
  • Update frequency: every 60.7 days
  • Top authors: Iulia Cazan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,352 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.00MB] [CPU: ▼3.39ms] Passed 4 tests

An overview of server-side resources used by Latest Post Shortcode Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.97 ▼5.93
Dashboard /wp-admin3.31 ▲0.0043.05 ▼9.19
Posts /wp-admin/edit.php3.36 ▲0.0046.26 ▲0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.36 ▲1.45
Media Library /wp-admin/upload.php3.23 ▲0.0038.52 ▲4.78

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Latest Post Shortcode Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.29 ▼1.011.93 ▲0.2639.73 ▼6.59
Dashboard /wp-admin2,209 ▲215.91 ▲1.01113.27 ▼2.8637.79 ▼4.37
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0838.72 ▼1.0233.95 ▼0.50
Add New Post /wp-admin/post-new.php1,530 ▲1623.40 ▲5.94642.68 ▼43.4057.60 ▲3.38
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.02100.17 ▲0.7346.72 ▲3.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/latest-post-shortcode-slider-extension/latest-post-shortcode-slider.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

latest-post-shortcode-slider-extension/latest-post-shortcode-slider.php 85% from 13 tests

This is the main PHP file of "Latest Post Shortcode Slider" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("latest-post-shortcode-slider-extension.php" instead of "latest-post-shortcode-slider.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,308 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51065591,358
Markdown1950483
PHP12868256
CSS24122186
JSON10025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/third-party/jquery.bxslider/images/controls.png2.74KB1.42KB▼ 48.29%