84% loops-n-slides

Code Review | Loops 'n Slides

WordPress plugin Loops 'n Slides scored84%from 54 tests.

About plugin

  • Plugin page: loops-n-slides
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2018
  • Latest release: Jan 14, 2020
  • Number of updates: 12
  • Update frequency: every 59.9 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.75ms] Passed 4 tests

Analyzing server-side resources used by Loops 'n Slides
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.85 ▼1.92
Dashboard /wp-admin3.38 ▲0.0749.45 ▼8.42
Posts /wp-admin/edit.php3.43 ▲0.0748.57 ▼0.47
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.98 ▼16.17
Media Library /wp-admin/upload.php3.30 ▲0.0738.62 ▲7.75
All Loops /wp-admin/edit.php?post_type=loopsns-loop3.3454.71
All Slides /wp-admin/edit.php?post_type=loopsns-slide3.3540.30
Settings /wp-admin/admin.php?page=loops-n-slides3.2732.95

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
_loopsns-db_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Loops 'n Slides
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲16313.42 ▼0.949.91 ▲7.9943.62 ▼9.27
Dashboard /wp-admin2,226 ▲495.50 ▼0.1182.82 ▼17.0939.69 ▼4.19
Posts /wp-admin/edit.php2,134 ▲342.04 ▲0.0239.44 ▲2.1236.50 ▲0.08
Add New Post /wp-admin/post-new.php1,562 ▲2523.14 ▲4.97680.55 ▲18.3353.20 ▼15.93
Media Library /wp-admin/upload.php1,437 ▲374.07 ▼0.12125.44 ▲19.0051.77 ▲5.07
All Loops /wp-admin/edit.php?post_type=loopsns-loop1,0972.0246.2930.79
All Slides /wp-admin/edit.php?post_type=loopsns-slide1,1712.0542.4836.85
Settings /wp-admin/admin.php?page=loops-n-slides1,0352.1934.7441.31

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • _loopsns-db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/loops-n-slides/templates/loop-carousel.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/loops-n-slides/templates/loop-list.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/loops-n-slides/loops-n-slides.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/loops-n-slides/templates/loop-gallery.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/loops-n-slides/templates/loop-excerpts.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: loop, shortcode, slides, carousel, custom query...

loops-n-slides/loops-n-slides.php Passed 13 tests

The main PHP file in "Loops 'n Slides" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
139 characters long description:
A simple yet powerful plugin that allows you to display posts loops based on any query, as a carousel of slides or using a custom template.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin8,165 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JSON6004,714
JavaScript863701,211
PHP112901941,207
TypeScript6111220503
CSS3424132
LESS1124111
Sass260110
HTML13088
Markdown127071
YAML10012
Ruby18136

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.71
▷ Minimum class complexity4.00
▷ Maximum class complexity37.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods69
▷ Static methods913.04%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin