83% easy-javascript-post-slider

Code Review | Simple Image Slider

WordPress plugin Simple Image Slider scored83%from 54 tests.

About plugin

  • Plugin page: easy-javascript-p...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2013
  • Latest release: Feb 8, 2023
  • Number of updates: 40
  • Update frequency: every 85.1 days
  • Top authors: uvesh123 (97.5%)perceptionsystemlabs (5%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /19,014 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.92ms] Passed 4 tests

Server-side resources used by Simple Image Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.20 ▼3.31
Dashboard /wp-admin3.34 ▼0.0048.61 ▼15.40
Posts /wp-admin/edit.php3.39 ▲0.0449.19 ▲1.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.69 ▼6.55
Media Library /wp-admin/upload.php3.27 ▲0.0438.13 ▲2.25
Add New Slide /wp-admin/post-new.php?post_type=slider3.3877.53
Simple Slider /wp-admin/edit.php?post_type=slider3.3138.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Image Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.42 ▼0.977.94 ▲6.3839.84 ▼0.25
Dashboard /wp-admin2,225 ▲455.63 ▲0.0594.73 ▲7.5842.38 ▲1.30
Posts /wp-admin/edit.php2,124 ▲241.94 ▼0.0740.38 ▲2.8535.17 ▼2.44
Add New Post /wp-admin/post-new.php1,549 ▲2123.59 ▲0.47702.62 ▲93.1385.01 ▲38.96
Media Library /wp-admin/upload.php1,427 ▲274.22 ▲0.03112.10 ▲5.1848.17 ▲0.11
Add New Slide /wp-admin/post-new.php?post_type=slider2,1757.57166.9159.76
Simple Slider /wp-admin/edit.php?post_type=slider1,1081.9729.8527.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/easy-javascript-post-slider/simple_slider.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (How to add New slide using post type as slider) image required
  • Screenshots: Please describe screenshot #7 in easy-javascript-post-slider/assets to your readme.txt
You can take inspiration from this readme.txt

easy-javascript-post-slider/simple_slider.php 92% from 13 tests

The main file in "Simple Image Slider" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-javascript-post-slider.php" instead of "simple_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected142 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11910106
CSS14928
JavaScript2068

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions9
▷ Named functions9100.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
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
img/pagination.png1.36KB0.58KB▼ 57.53%