84% simple-carousel

Code Review | Simple Carousel

WordPress plugin Simple Carousel scored84%from 54 tests.

About plugin

  • Plugin page: simple-carousel
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Jul 30, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 5
  • Update frequency: every 2.6 days
  • Top authors: sean137 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Simple Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.45 ▼6.71
Dashboard /wp-admin3.31 ▼0.0453.51 ▼12.48
Posts /wp-admin/edit.php3.36 ▲0.0055.63 ▲3.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.81 ▼6.15
Media Library /wp-admin/upload.php3.23 ▲0.0037.40 ▲0.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Simple Carousel: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.39 ▼0.101.68 ▼0.1744.14 ▼2.34
Dashboard /wp-admin2,221 ▲185.81 ▼0.08116.54 ▲8.6142.83 ▲2.25
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0641.42 ▼1.6537.12 ▼1.31
Add New Post /wp-admin/post-new.php1,526 ▼017.64 ▲0.01685.02 ▲53.9877.32 ▲6.75
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.0097.02 ▼1.7843.34 ▼7.09

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-carousel/simple-carousel.php:112

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: carousel, slides

simple-carousel/simple-carousel.php 92% from 13 tests

The main PHP file in "Simple Carousel" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected426 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25913159
Sass1350103
CSS10084
PHP1221280

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow-next.png1.13KB0.30KB▼ 72.92%
images/arrow-prev.png1.13KB0.31KB▼ 72.40%