84% ga-image-carousel

Code Review | GA Image Carousel

WordPress plugin GA Image Carousel scored84%from 54 tests.

About plugin

  • Plugin page: ga-image-carousel
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2017
  • Latest release: Oct 3, 2017
  • Number of updates: 37
  • Update frequency: every 0.1 days
  • Top authors: graphicarea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,113 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼6.87ms] Passed 4 tests

An overview of server-side resources used by GA Image Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.56 ▲7.87
Dashboard /wp-admin3.33 ▼0.0252.08 ▼14.13
Posts /wp-admin/edit.php3.38 ▲0.0249.41 ▼7.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.74 ▼5.96
Media Library /wp-admin/upload.php3.25 ▲0.0234.35 ▼0.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for GA Image Carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.52 ▼0.8310.08 ▲8.1540.24 ▼3.13
Dashboard /wp-admin2,192 ▲155.62 ▼0.0593.04 ▲0.3639.72 ▲0.68
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0339.67 ▼0.6538.28 ▲0.07
Add New Post /wp-admin/post-new.php1,526 ▲123.58 ▼0.12674.64 ▲52.6456.43 ▼7.19
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.0395.35 ▼8.0349.67 ▲8.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ga-image-carousel/ga-image-carousel.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
You can look at the official readme.txt

ga-image-carousel/ga-image-carousel.php Passed 13 tests

This is the main PHP file of "GA Image Carousel" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Simple and light image carousel with animation and fancybox.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected561 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS3260241
JavaScript28810239
PHP118881

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions2
▷ Named functions2100.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
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/ga-arrow-r.png1.13KB0.35KB▼ 68.92%
images/ga-arrow-l.png1.15KB0.37KB▼ 67.40%