93% swiper-lite

Code Review | Swiper (LITE)

WordPress plugin Swiper (LITE) scored 93% from 54 tests.

About plugin

  • Plugin page: swiper-lite
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.1
  • WordPress version: 5.8.1
  • First release: Dec 16, 2018
  • Latest release: Aug 22, 2020
  • Number of updates: 28
  • Update frequency: every 22.0 days
  • Top authors: southdevondigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,861 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼147.26ms] Passed 4 tests

An overview of server-side resources used by Swiper (LITE)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0026.76 ▲6.02
Dashboard /wp-admin3.06 ▼0.0031.63 ▼12.19
Posts /wp-admin/edit.php3.12 ▲0.0132.00 ▲1.34
Add New Post /wp-admin/post-new.php5.43 ▼0.0172.91 ▼574.29
Media Library /wp-admin/upload.php3.01 ▲0.0023.08 ▼3.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Swiper (LITE)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲6515.96 ▲0.285.68 ▼3.1775.65 ▲1.51
Dashboard /wp-admin2,948 ▲496.07 ▼0.18117.40 ▼14.88167.61 ▼9.29
Posts /wp-admin/edit.php2,721 ▼223.24 ▲0.0165.33 ▲2.43143.43 ▲3.65
Add New Post /wp-admin/post-new.php3,716 ▼9118.86 ▲1.86422.51 ▼44.13160.16 ▼2.43
Media Library /wp-admin/upload.php1,767 ▲155.46 ▼0.07138.63 ▼8.25186.24 ▼7.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/swiper-lite/post-swiper.php:128

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)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === swiper-lite === )
  • Screenshots: Add a description for screenshot #4 in swiper-lite/assets to your readme.txt
You can look at the official readme.txt

swiper-lite/post-swiper.php 77% from 13 tests

The main PHP file in "Swiper (LITE)" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("swiper-lite.php" instead of "post-swiper.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 228 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 detected793 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS3556354
PHP11513276
JavaScript4371163

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin