93% unslider-image

Code Review | Unslider Image

WordPress plugin Unslider Image scored 93% from 54 tests.

About plugin

  • Plugin page: unslider-image
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 5.8.1
  • First release: May 18, 2014
  • Latest release: Jun 21, 2015
  • Number of updates: 4
  • Update frequency: every 99.8 days
  • Top authors: pashabd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,194 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.07ms] Passed 4 tests

This is a short check of server-side resources used by Unslider Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.06 ▲12.61
Dashboard /wp-admin3.07 ▲0.0249.29 ▲8.58
Posts /wp-admin/edit.php3.12 ▲0.0241.05 ▼3.59
Add New Post /wp-admin/post-new.php5.43 ▼0.0089.25 ▼568.74
Media Library /wp-admin/upload.php3.02 ▲0.0131.28 ▼0.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Unslider Image
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲23016.25 ▲0.7111.22 ▲2.6446.81 ▼2.24
Dashboard /wp-admin2,973 ▲366.00 ▲0.05144.26 ▲3.44112.51 ▼0.66
Posts /wp-admin/edit.php2,742 ▲62.70 ▼0.0059.98 ▼3.6290.91 ▼2.18
Add New Post /wp-admin/post-new.php1,687 ▲18918.82 ▲0.01357.79 ▼6.58106.59 ▼2.21
Media Library /wp-admin/upload.php1,813 ▲35.03 ▲0.00149.02 ▲3.44120.41 ▲0.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unslider-image/main-function.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Installed in demo server.) image not found
You can look at the official readme.txt

unslider-image/main-function.php 92% from 13 tests

"Unslider Image" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("unslider-image.php" instead of "main-function.php")

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
No dangerous file extensions were detected282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24438129
CSS18188
PHP1292465

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.05
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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.64MB with 0.22MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png1.47KB1.60KB0.00%
img/field.png657.96KB214.64KB▼ 67.38%