78% slider-templates

Code Review | Slider Templates

WordPress plugin Slider Templates scored78%from 54 tests.

About plugin

  • Plugin page: slider-templates
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Jan 14, 2023
  • Number of updates: 7
  • Update frequency: every 142.2 days
  • Top authors: codelessthemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /16,664 total downloads

Benchmarks

Plugin footprint 82% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▲518.38ms] 75% from 4 tests

This is a short check of server-side resources used by Slider Templates
Please have a look at the following items
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 518.38ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.74 ▼0.64
Dashboard /wp-admin3.47 ▲0.12788.19 ▲727.06
Posts /wp-admin/edit.php3.52 ▲0.16672.76 ▲624.60
Add New Post /wp-admin/post-new.php6.01 ▲0.12955.68 ▲852.25
Media Library /wp-admin/upload.php3.33 ▲0.10757.19 ▲722.51

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Slider Templates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.68 ▼0.715.34 ▲3.6143.04 ▲1.40
Dashboard /wp-admin2,222 ▲345.83 ▼0.02100.08 ▼4.8436.50 ▼4.91
Posts /wp-admin/edit.php2,108 ▲192.16 ▲0.1343.38 ▲2.7332.47 ▼3.96
Add New Post /wp-admin/post-new.php1,531 ▲1222.95 ▼0.40661.52 ▲7.3263.88 ▲8.68
Media Library /wp-admin/upload.php1,410 ▲224.18 ▼0.0196.04 ▼14.3347.26 ▲1.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/slider-templates/public/partials/slider-templates-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/slider-templates/admin/partials/slider-templates-admin-display.php:21
    • > PHP Notice
      Undefined variable: logged_user in wp-content/plugins/slider-templates/admin/partials/slider-templates-admin-display.php on line 20
    • > PHP Notice
      Undefined variable: premium_theme_actived_key in wp-content/plugins/slider-templates/admin/partials/slider-templates-admin-display.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("codeless.co")
You can take inspiration from this readme.txt

slider-templates/slider-templates.php Passed 13 tests

"Slider Templates" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
50 characters long description:
Easily Import slider-templates.com templates to WP

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,645 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,974
PHP12179535441
JavaScript22354140
Sass17089
CSS2041

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin