10% netgo-horizontal-carousel

Code Review | Horizontal Carousel

WordPress plugin Horizontal Carousel scored10%from 54 tests.

About plugin

  • Plugin page: netgo-horizontal-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 5, 2015
  • Latest release: Aug 20, 2016
  • Number of updates: 16
  • Update frequency: every 23.9 days
  • Top authors: NetAttingo Technologies (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /5,684 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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

Server-side resources used by Horizontal Carousel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.84 ▲2.21
Dashboard /wp-admin3.38 ▲0.0842.56 ▲0.09
Posts /wp-admin/edit.php3.43 ▲0.0743.70 ▼1.02
Add New Post /wp-admin/post-new.php5.96 ▲0.0878.39 ▼17.25
Media Library /wp-admin/upload.php3.30 ▲0.0737.18 ▲4.14
NetGo Carousel /wp-admin/edit.php?post_type=carousel-image3.3435.05
Carousel Categories /wp-admin/edit-tags.php?taxonomy=carousel-category&post_type=carousel-image3.2936.35
Shortcode Settings /wp-admin/edit.php?post_type=carousel-image&page=netgo-horizontal-carousel3.2932.56
Add New Image /wp-admin/post-new.php?post_type=carousel-image3.3750.51

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

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

Browser metrics Passed 4 tests

Horizontal Carousel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.29 ▼1.248.12 ▲6.3639.31 ▼1.38
Dashboard /wp-admin2,243 ▲625.49 ▼0.2186.57 ▼13.8739.87 ▼1.97
Posts /wp-admin/edit.php2,148 ▲481.97 ▼0.0640.96 ▲3.6137.72 ▲1.74
Add New Post /wp-admin/post-new.php1,570 ▲4223.07 ▲0.03588.15 ▼39.5262.16 ▼2.99
Media Library /wp-admin/upload.php1,448 ▲514.21 ▲0.0599.51 ▼4.4844.11 ▼1.54
NetGo Carousel /wp-admin/edit.php?post_type=carousel-image1,1121.9730.6829.39
Carousel Categories /wp-admin/edit-tags.php?taxonomy=carousel-category&post_type=carousel-image1,3252.1230.6733.61
Shortcode Settings /wp-admin/edit.php?post_type=carousel-image&page=netgo-horizontal-carousel8902.0025.2125.27
Add New Image /wp-admin/post-new.php?post_type=carousel-image1,7513.5368.5534.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_netgocarousel
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=carousel-image&page=netgo-horizontal-carousel
    • > Notice in wp-content/plugins/netgo-horizontal-carousel/pages/image-management-show.php+6
    Undefined index: frm_cros_display
    • > GET request to /wp-admin/edit.php?post_type=carousel-image&page=netgo-horizontal-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/edit.php?post_type=carousel-image&page=netgo-horizontal-carousel
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/netgo-horizontal-carousel/pages/image-management-show.php
    • > /wp-content/plugins/netgo-horizontal-carousel/pages/image-management-add.php
    • > /wp-content/plugins/netgo-horizontal-carousel/pages/image-management-edit.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/netgo-horizontal-carousel/netgo-horizontal-carousel.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/netgo-horizontal-carousel/netgo-horizontal-carousel.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Back end add Carousel Category.), #2 (Back end add Image.), #3 (Back end Carousel shortcode list page.), #4 (Back end add shortcodes.), #5 (Front end slider look.)
Please take inspiration from this readme.txt

netgo-horizontal-carousel/netgo-horizontal-carousel.php Passed 13 tests

The primary PHP file in "Horizontal Carousel" version 1.0.0 is used by WordPress to initiate all plugin functionality
80 characters long description:
Using the plugin we can put horizontal image slider with the help of shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin961 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP412645725
JavaScript2410217
CSS13219

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.33MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png21.75KB10.74KB▼ 50.64%
screenshot-1.png38.58KB20.15KB▼ 47.77%
screenshot-2.png29.00KB14.32KB▼ 50.62%
screenshot-4.png34.58KB18.48KB▼ 46.56%
screenshot-5.png209.43KB46.62KB▼ 77.74%