72% neat-slider

Code Review | Neat Slider

WordPress plugin Neat Slider scored72%from 54 tests.

About plugin

  • Plugin page: neat-slider
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Jul 14, 2015
  • Number of updates: 22
  • Update frequency: every 15.0 days
  • Top authors: EnergeticThemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /8,153 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.25MB] [CPU: ▲4.60ms] Passed 4 tests

Analyzing server-side resources used by Neat Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2746.68 ▲4.76
Dashboard /wp-admin3.59 ▲0.2953.08 ▲2.42
Posts /wp-admin/edit.php3.64 ▲0.2850.96 ▲6.28
Add New Post /wp-admin/post-new.php6.13 ▲0.2493.27 ▲6.97
Media Library /wp-admin/upload.php3.45 ▲0.2239.86 ▲4.93
Add New /wp-admin/post-new.php?post_type=neat-slider3.9847.51
All Neat Sliders /wp-admin/edit.php?post_type=neat-slider3.5037.48

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Neat Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲20213.99 ▼0.569.02 ▲7.0542.25 ▼4.88
Dashboard /wp-admin2,239 ▲484.91 ▼0.96110.01 ▲8.7445.20 ▲2.37
Posts /wp-admin/edit.php2,123 ▲342.23 ▲0.2436.49 ▼2.8133.68 ▲0.07
Add New Post /wp-admin/post-new.php1,543 ▲2923.27 ▼0.32653.13 ▼37.6152.09 ▼1.97
Media Library /wp-admin/upload.php1,424 ▲364.24 ▲0.02102.81 ▼2.8846.90 ▼0.01
Add New /wp-admin/post-new.php?post_type=neat-slider4,1975.5295.7247.24
All Neat Sliders /wp-admin/edit.php?post_type=neat-slider1,0982.2031.1828.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=neat-slider
    • > Warning in wp-content/plugins/neat-slider/php/class-fieldmanager-field.php+339
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/post-new.php?post_type=neat-slider
    • > User deprecated in wp-includes/functions.php+5463
    Function wp_fullscreen_html is deprecated since version 4.3.0 with no alternative available.

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
Almost there! Just fix the following items
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Datasource' not found in wp-content/plugins/neat-slider/php/datasource/class-fieldmanager-datasource-term.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Field' not found in wp-content/plugins/neat-slider/php/class-fieldmanager-password.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/neat-slider/templates/textfield.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/neat-slider/php/util/class-fieldmanager-util-term-meta.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Field' not found in wp-content/plugins/neat-slider/php/class-fieldmanager-draggablepost.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Context' not found in wp-content/plugins/neat-slider/php/context/class-fieldmanager-context-submenu.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/neat-slider/tests/php/test_fieldmanager_field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Options' not found in wp-content/plugins/neat-slider/php/class-fieldmanager-checkboxes.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FM_Demo_Data_Structures() in wp-content/plugins/neat-slider/lib/class-slider-fields.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Fieldmanager_Options' not found in wp-content/plugins/neat-slider/php/class-fieldmanager-radios.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=neat-slider
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/neat-slider/js/fieldmanager.js?ver=1.0.2:165:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=neat-slider
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/neat-slider/js/fieldmanager-group-tabs.js?ver=1.0.1:17:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=neat-slider
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/edit.php?post_type=neat-slider
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/neat-slider/js/fieldmanager.js?ver=1.0.2:165:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=neat-slider
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: Contributors not specified
  • Tags: Too many tags (46 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

neat-slider/neat-slider.php Passed 13 tests

Analyzing the main PHP file in "Neat Slider" version 1.2
75 characters long description:
Neat Slider is powerful and easy to use WordPress responsive slider plugin.

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
Everything looks great! No dangerous files found in this plugin20,712 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript272,7942,44214,390
PHP441,0222,5614,139
CSS162131102,164
Markdown18019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.64
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes37.14%
▷ Concrete classes3992.86%
▷ Final classes00.00%
Methods221
▷ Static methods83.62%
▷ Public methods19688.69%
▷ Protected methods146.33%
▷ Private methods114.98%
Functions48
▷ Named functions3777.08%
▷ Anonymous functions1122.92%
Constants5
▷ Global constants5100.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
18 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/jquery-ui/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
css/jquery-ui/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%