84% flexslider-hg

Code Review | Responsive WordPress Slider - HG Slider

WordPress plugin Responsive WordPress Slider - HG Slider scored84%from 54 tests.

About plugin

  • Plugin page: flexslider-hg
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Mar 30, 2021
  • Number of updates: 62
  • Update frequency: every 48.7 days
  • Top authors: halgatewood (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10,000+ active /54,680 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼12.05ms] Passed 4 tests

An overview of server-side resources used by Responsive WordPress Slider - HG Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.82 ▼2.77
Dashboard /wp-admin3.46 ▲0.1651.59 ▲0.05
Posts /wp-admin/edit.php3.58 ▲0.2248.66 ▼8.40
Add New Post /wp-admin/post-new.php6.05 ▲0.1689.97 ▼25.43
Media Library /wp-admin/upload.php3.39 ▲0.1637.59 ▼11.58
All Slides /wp-admin/edit.php?post_type=slides3.4399.40
All Sliders /wp-admin/edit.php?post_type=sliders3.4339.22
Add New Slider /wp-admin/post-new.php?post_type=sliders3.4244.21
Add New Slide /wp-admin/post-new.php?post_type=slides3.4748.85

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive WordPress Slider - HG Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.49 ▼0.779.16 ▲7.3137.62 ▼7.43
Dashboard /wp-admin2,236 ▲655.64 ▲0.0791.73 ▼24.8037.51 ▼24.27
Posts /wp-admin/edit.php2,141 ▲381.99 ▼0.0337.76 ▼14.0333.16 ▼18.42
Add New Post /wp-admin/post-new.php1,561 ▲3523.19 ▲1.71641.65 ▼103.7556.05 ▲2.12
Media Library /wp-admin/upload.php1,441 ▲444.27 ▲0.10130.33 ▲5.0755.82 ▼4.79
All Slides /wp-admin/edit.php?post_type=slides1,1371.9233.2635.48
All Sliders /wp-admin/edit.php?post_type=sliders1,0881.9638.9732.76
Add New Slider /wp-admin/post-new.php?post_type=sliders1,7302.5258.9270.69
Add New Slide /wp-admin/post-new.php?post_type=slides1,7973.5980.5136.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flexslider-hg/flexslider-hg.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

flexslider-hg/flexslider-hg.php Passed 13 tests

The main file in "Responsive WordPress Slider - HG Slider" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
75 characters long description:
A responsive image rotator plugin that easily creates WordPress slideshows.

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
No dangerous file extensions were detected622 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP214752532
CSS1302457
JavaScript101033

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%
images/bg_direction_nav_squared.png1.32KB0.35KB▼ 73.71%
images/bg_direction_nav_rounded.png1.82KB0.79KB▼ 56.38%