93% wp-smart-flexslider

Code Review | WP Smart Flexslider

WordPress plugin WP Smart Flexslider scored 93% from 54 tests.

About plugin

  • Plugin page: wp-smart-flexslider
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 5.8.1
  • First release: May 28, 2014
  • Latest release: Jan 23, 2018
  • Number of updates: 37
  • Update frequency: every 36.1 days
  • Top authors: rajanit2000 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 19,716 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼140.94ms] Passed 4 tests

A check of server-side resources used by WP Smart Flexslider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1445.68 ▲11.62
Dashboard /wp-admin3.20 ▲0.1556.79 ▲8.49
Posts /wp-admin/edit.php3.31 ▲0.2051.48 ▼1.02
Add New Post /wp-admin/post-new.php5.56 ▲0.13106.03 ▼574.93
Media Library /wp-admin/upload.php3.14 ▲0.1441.30 ▲3.72
All Sliders /wp-admin/edit.php?post_type=flexslider3.1846.23
Add New /wp-admin/post-new.php?post_type=flexslider3.2054.94

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Smart Flexslider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲29116.56 ▲1.3116.39 ▲4.4949.92 ▲0.29
Dashboard /wp-admin3,012 ▲785.96 ▼0.27154.51 ▼10.67118.09 ▲5.90
Posts /wp-admin/edit.php2,778 ▲392.72 ▲0.0164.57 ▼9.8585.59 ▲0.84
Add New Post /wp-admin/post-new.php1,645 ▼1,98921.43 ▲6.50329.66 ▼183.73107.35 ▼8.18
Media Library /wp-admin/upload.php1,849 ▲425.07 ▲0.05172.00 ▲6.58123.57 ▲2.53
All Sliders /wp-admin/edit.php?post_type=flexslider1,4382.6472.4778.18
Add New /wp-admin/post-new.php?post_type=flexslider2,5954.61122.38101.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-smart-flexslider/public/partials/wpsmartflexslider-public-display.php
    • > /wp-content/plugins/wp-smart-flexslider/admin/partials/wpsmartflexslider-admin-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-smart-flexslider === )
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-smart-flexslider/wpsmartflexslider.php 85% from 13 tests

This is the main PHP file of "WP Smart Flexslider" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-smart-flexslider.php" instead of "wpsmartflexslider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,009 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12151541527
SVG100288
CSS3110133
JavaScript3166061

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.14
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.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
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
admin/assets/flexslider.png1.13KB0.43KB▼ 61.54%