99% simple-post-slider

Code Review | Simple Post Slider

WordPress plugin Simple Post Slider scored 99% from 54 tests.

About plugin

  • Plugin page: simple-post-slider
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 5.8.1
  • First release: Feb 16, 2021
  • Latest release: Feb 16, 2021
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: paluh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,110 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼149.34ms] Passed 4 tests

An overview of server-side resources used by Simple Post Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0427.86 ▲3.33
Dashboard /wp-admin3.11 ▲0.0432.84 ▼9.49
Posts /wp-admin/edit.php3.16 ▲0.0533.54 ▼3.89
Add New Post /wp-admin/post-new.php5.47 ▲0.0272.37 ▼580.07
Media Library /wp-admin/upload.php3.05 ▲0.0422.06 ▼3.90

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Post Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲25216.55 ▲0.9310.43 ▲4.6174.82 ▲1.32
Dashboard /wp-admin2,958 ▲596.21 ▲0.04114.35 ▼16.85189.59 ▲18.68
Posts /wp-admin/edit.php2,770 ▲303.29 ▼0.0768.62 ▲2.93150.38 ▲7.37
Add New Post /wp-admin/post-new.php1,902 ▼1,84121.17 ▲2.21394.72 ▼34.74195.59 ▲30.47
Media Library /wp-admin/upload.php1,780 ▲285.63 ▲0.16123.72 ▼16.43204.51 ▲23.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 90% 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
8 plugin tags: simple slider, post slider, filter categories, number of posts, slider...

simple-post-slider/wpsps-main.php 77% from 13 tests

"Simple Post Slider" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-post-slider.php" instead of "wpsps-main.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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin769 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS44615499
PHP43535243
JavaScript31527

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/wpsps-icon-hover.png0.25KB0.13KB▼ 50.19%
assets/img/icon.png1.46KB0.58KB▼ 60.63%
assets/img/slidericon.fw.png51.98KB0.35KB▼ 99.33%