78% getty-ghetto-slider

Code Review | Getty 'Ghetto' Slider

WordPress plugin Getty 'Ghetto' Slider scored78%from 54 tests.

About plugin

  • Plugin page: getty-ghetto-slider
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Mar 31, 2014
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: uiux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.20ms] Passed 4 tests

This is a short check of server-side resources used by Getty 'Ghetto' Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.49 ▲1.39
Dashboard /wp-admin3.35 ▲0.0445.04 ▼9.58
Posts /wp-admin/edit.php3.40 ▲0.0453.59 ▲1.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.31 ▲2.20
Media Library /wp-admin/upload.php3.27 ▲0.0436.89 ▲1.40
Getty Slider Settings /wp-admin/edit.php?post_type=ghetto_slide&page=getty-slider-settings3.2432.81
Add New /wp-admin/post-new.php?post_type=ghetto_slide3.3851.44
All Ghetto Slides /wp-admin/edit.php?post_type=ghetto_slide3.3141.54

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Getty 'Ghetto' Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.29 ▼0.082.18 ▲0.3540.01 ▼9.00
Dashboard /wp-admin2,223 ▲465.62 ▲0.0292.42 ▼3.1639.45 ▼4.13
Posts /wp-admin/edit.php2,131 ▲342.04 ▲0.0540.83 ▲2.7535.94 ▼0.74
Add New Post /wp-admin/post-new.php1,552 ▲2623.00 ▼0.70613.57 ▼108.0751.84 ▼15.60
Media Library /wp-admin/upload.php1,434 ▲344.14 ▼0.1198.59 ▼6.9346.63 ▼0.13
Getty Slider Settings /wp-admin/edit.php?post_type=ghetto_slide&page=getty-slider-settings8342.0324.8526.73
Add New /wp-admin/post-new.php?post_type=ghetto_slide2,2907.58169.3667.74
All Ghetto Slides /wp-admin/edit.php?post_type=ghetto_slide1,0951.9330.4333.14

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/getty-ghetto-slider/templates/swiper.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/getty-ghetto-slider/templates/swiper.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getty-ghetto-slider/getty-slider.php:22
    • > PHP Notice
      Undefined variable: ghettoSlides in wp-content/plugins/getty-ghetto-slider/templates/swiper.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/getty-ghetto-slider/admin/getty-slider-admin.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === getty-ghetto-slider === )
Please take inspiration from this readme.txt

getty-ghetto-slider/getty-slider.php 85% from 13 tests

"Getty 'Ghetto' Slider" version 1...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("getty-ghetto-slider.php" instead of "getty-slider.php")

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
There were no executable files found in this plugin2,530 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12372672,270
PHP33315152
CSS11523108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png35.50KB10.30KB▼ 70.99%
assets/screenshot-2.png318.93KB121.17KB▼ 62.01%