78% ng-animated-slider

Code Review | NG Animated Slider

WordPress plugin NG Animated Slider scored78%from 54 tests.

About plugin

  • Plugin page: ng-animated-slider
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2019
  • Latest release: Mar 3, 2019
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: sushil51 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,180 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
Installer ran successfully

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

Server-side resources used by NG Animated Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.30 ▲5.31
Dashboard /wp-admin3.35 ▲0.0046.63 ▼10.84
Posts /wp-admin/edit.php3.40 ▲0.0445.57 ▲1.24
Add New Post /wp-admin/post-new.php5.95 ▲0.0777.72 ▼16.91
Media Library /wp-admin/upload.php3.27 ▲0.0430.99 ▼6.57
Slider categories /wp-admin/edit-tags.php?taxonomy=slider_category&post_type=slider3.3634.78
Add New Slider /wp-admin/post-new.php?post_type=slider3.3950.78
All Sliders /wp-admin/edit.php?post_type=slider3.3135.56

Server storage [IO: ▲1.24MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for NG Animated Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19913.37 ▼1.419.74 ▲8.1447.55 ▲5.60
Dashboard /wp-admin2,227 ▲475.58 ▲0.0181.93 ▼14.0640.58 ▼3.51
Posts /wp-admin/edit.php2,135 ▲352.02 ▲0.0640.02 ▲3.6235.65 ▲1.75
Add New Post /wp-admin/post-new.php1,556 ▲3022.99 ▲1.96680.70 ▼24.4752.78 ▼0.13
Media Library /wp-admin/upload.php1,435 ▲384.19 ▼0.0195.49 ▼13.8244.60 ▲0.64
Slider categories /wp-admin/edit-tags.php?taxonomy=slider_category&post_type=slider1,3092.1225.9128.79
Add New Slider /wp-admin/post-new.php?post_type=slider2,3527.82170.7862.81
All Sliders /wp-admin/edit.php?post_type=slider1,1081.9628.7726.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ng-animated-slider/admin/partials/ng-animated-slider-admin-display.php
    • > /wp-content/plugins/ng-animated-slider/public/partials/ng-animated-slider-public-display.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ng-animated-slider/includes/ng-custom-functions.php:535
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ng-animated-slider/includes/ng-custom-metabox.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ng-animated-slider/inc/customizer-sections.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ng-animated-slider/includes/ng-custom-post-type-register.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === ng-animated-slider === )
  • Donate link: Invalid url: "paypal.me/pridethemes"
Please take inspiration from this readme.txt

ng-animated-slider/ng-animated-slider.php 92% from 13 tests

The main PHP file in "NG Animated Slider" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 221 characters long)

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
There were no executable files found in this plugin12,559 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS7116459,607
JavaScript12941991,255
PHP182765801,012
SVG100685

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin