79% slider-for-writers

Code Review | Slider for Writers

WordPress plugin Slider for Writers scored 79% from 54 tests.

About plugin

  • Plugin page: slider-for-writers
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 5.8.1
  • First release: Apr 12, 2014
  • Latest release: Aug 12, 2014
  • Number of updates: 15
  • Update frequency: every 8.1 days
  • Top authors: artanik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.86MB] [CPU: ▼172.37ms] Passed 4 tests

This is a short check of server-side resources used by Slider for Writers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1835.03 ▲14.58
Dashboard /wp-admin2.79 ▼0.2622.15 ▼24.64
Posts /wp-admin/edit.php2.79 ▼0.3121.02 ▼21.71
Add New Post /wp-admin/post-new.php2.79 ▼2.6421.39 ▼629.29
Media Library /wp-admin/upload.php2.79 ▼0.2120.49 ▼13.83
Slider for Writers /wp-admin/options-general.php?page=slider-for-writers/slider-for-writers.php2.7920.97

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
writer_pauseOnHover
writer_thumbnail
writer_autoplay
writer_description
writer_easing
writer_fx
writer_duration
writer_navs

Browser metrics Passed 4 tests

A check of browser resources used by Slider for Writers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,947 ▲35216.54 ▲0.8722.30 ▲11.5249.69 ▲2.94
Dashboard /wp-admin2,980 ▲495.94 ▲0.01132.02 ▼20.41119.74 ▲8.01
Posts /wp-admin/edit.php2,746 ▲72.72 ▼0.0070.35 ▲1.9884.53 ▼2.94
Add New Post /wp-admin/post-new.php1,688 ▲518.09 ▼0.65398.29 ▼2.92116.97 ▲7.39
Media Library /wp-admin/upload.php1,814 ▲75.00 ▼0.03158.59 ▲3.03114.34 ▼3.79
Slider for Writers /wp-admin/options-general.php?page=slider-for-writers/slider-for-writers.php1,4072.2263.7683.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-for-writers/slider-for-writers.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/slider-for-writers/slider-for-writers.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-for-writers/editor/add_buttons.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: image, slider, page, images admin, post...

slider-for-writers/slider-for-writers.php Passed 13 tests

"Slider for Writers" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
Simple wordpress plugin for slider with lightbox in the posts and static page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected713 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP26624269
JavaScript76352236
CSS279124
PO File1182367
JSON10017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
editor/writer_slider.png15.66KB1.13KB▼ 92.80%
assets/images/dark_controls.png1.59KB1.67KB0.00%