84% tiled-gallery-carousel-without-jetpack

Code Review | Tiled Gallery Carousel Without JetPack

WordPress plugin Tiled Gallery Carousel Without JetPack scored84%from 54 tests.

About plugin

  • Plugin page: tiled-gallery-car...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-5.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2013
  • Latest release: Apr 2, 2020
  • Number of updates: 35
  • Update frequency: every 67.5 days
  • Top authors: raja3c (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

10,000+ active /265,782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲4.79ms] Passed 4 tests

This is a short check of server-side resources used by Tiled Gallery Carousel Without JetPack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.4845.33 ▲2.60
Dashboard /wp-admin3.85 ▲0.5053.83 ▲4.34
Posts /wp-admin/edit.php3.90 ▲0.5055.79 ▲7.35
Add New Post /wp-admin/post-new.php6.37 ▲0.44103.19 ▲9.10
Media Library /wp-admin/upload.php3.71 ▲0.4440.96 ▲4.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 331 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Tiled Gallery Carousel Without JetPack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.33 ▼0.031.77 ▼0.1643.39 ▼1.11
Dashboard /wp-admin2,212 ▲355.55 ▼0.1288.54 ▼11.1871.20 ▲25.21
Posts /wp-admin/edit.php2,123 ▲232.01 ▲0.0440.89 ▲3.3134.55 ▲0.10
Add New Post /wp-admin/post-new.php1,550 ▲2223.52 ▲0.30648.03 ▼14.2536.32 ▼13.99
Media Library /wp-admin/upload.php1,429 ▲264.27 ▲0.0799.56 ▼3.8380.43 ▲32.17

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 36× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.2/tiled-gallery.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.0/trunk/jetpack-carousel.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tiled-gallery.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/1.9/jetpack-carousel.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.1/functions.gallery.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.2/functions.gallery.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.2/jetpack-carousel.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/3.0/tiled-gallery.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/1.0/tiled-gallery.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiled-gallery-carousel-without-jetpack/tags/2.9/jetpack-carousel.php:30

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: carousel, lightbox, tiled gallery, gallery carousel, jetpack lite...

tiled-gallery-carousel-without-jetpack/tiled-gallery.php 85% from 13 tests

The main PHP file in "Tiled Gallery Carousel Without JetPack" ver. 3.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 242 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("tiled-gallery-carousel-without-jetpack.php" instead of "tiled-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin13,552 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP162,1071,2687,748
CSS7500563,109
JavaScript65042322,577
PO File14646118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity30.71
▷ Minimum class complexity2.00
▷ Maximum class complexity279.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes192
▷ Abstract classes00.00%
▷ Concrete classes192100.00%
▷ Final classes00.00%
Methods1,554
▷ Static methods60038.61%
▷ Public methods1,50696.91%
▷ Protected methods00.00%
▷ Private methods483.09%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants144
▷ Global constants00.00%
▷ Class constants144100.00%
▷ Public constants144100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
100 PNG files occupy 0.35MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tags/1.9/images/carousel-likereblog-2x.png1.07KB1.46KB0.00%
tags/1.1/images/carousel-likereblog-2x.png1.07KB1.46KB0.00%
tags/2.9/images/carousel-sprite-2x.png3.04KB2.35KB▼ 22.72%
tags/1.0/images/arrows.png5.26KB4.17KB▼ 20.72%
tags/1.3/images/carousel-sprite.png2.12KB1.36KB▼ 35.58%