84% sample-slider

Code Review | Sample Slider

WordPress plugin Sample Slider scored84%from 54 tests.

About plugin

  • Plugin page: sample-slider
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.6
  • WordPress version: 6.3.1
  • First release: Sep 6, 2013
  • Latest release: Sep 6, 2013
  • Number of updates: 35
  • Update frequency: every 0.3 days
  • Top authors: mitali.cyrus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.98ms] Passed 4 tests

This is a short check of server-side resources used by Sample Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.58 ▲1.09
Dashboard /wp-admin3.32 ▼0.0347.01 ▼17.25
Posts /wp-admin/edit.php3.37 ▲0.0146.22 ▼3.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.19 ▼8.79
Media Library /wp-admin/upload.php3.25 ▲0.0132.08 ▼1.97
Sample /wp-admin/options-general.php?page=sample-menu3.2130.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sample Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.66 ▼0.968.57 ▲6.8040.34 ▼2.02
Dashboard /wp-admin2,199 ▲255.54 ▼0.1384.33 ▼20.7836.33 ▼9.08
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0436.96 ▼1.1433.95 ▼1.40
Add New Post /wp-admin/post-new.php1,540 ▲918.42 ▼4.41618.64 ▲10.7363.59 ▲12.08
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.0293.93 ▼5.8341.29 ▼3.78
Sample /wp-admin/options-general.php?page=sample-menu8131.9922.6325.80

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× 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/sample-slider/sample.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sample-slider/admin/sample-admin.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: responsive, carousel, slider, sample, banner...

sample-slider/sample.php 92% from 13 tests

The principal PHP file in "Sample Slider" v. 0.1 is loaded by WordPress automatically on each request
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 ("sample-slider.php" instead of "sample.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin8,484 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS616733,455
Sass91,152142,303
LESS91,152872,231
SVG100399
PHP2614584
JavaScript3678
Markdown1204

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.00
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.46MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png14.04KB11.77KB▼ 16.21%
img/pagination.png1.36KB0.58KB▼ 57.53%
assets/screenshot-1.png445.31KB249.60KB▼ 43.95%
documentation/img/code_sample.png14.04KB11.77KB▼ 16.21%