84% wp-flexslider

Code Review | WP Flexslider

WordPress plugin WP Flexslider scored84%from 54 tests.

About plugin

  • Plugin page: wp-flexslider
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2016
  • Latest release: May 6, 2019
  • Number of updates: 51
  • Update frequency: every 19.0 days
  • Top authors: mnmlthms (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /19,822 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.50ms] Passed 4 tests

A check of server-side resources used by WP Flexslider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.43 ▲2.91
Dashboard /wp-admin3.43 ▲0.0846.65 ▼14.59
Posts /wp-admin/edit.php3.54 ▲0.1946.18 ▼6.53
Add New Post /wp-admin/post-new.php6.01 ▲0.1282.95 ▼11.77
Media Library /wp-admin/upload.php3.35 ▲0.1240.74 ▲6.09
WP Flexslider /wp-admin/options-general.php?page=wp-flexslider3.3232.39

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Flexslider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.22 ▼1.161.63 ▼0.0943.16 ▲1.05
Dashboard /wp-admin2,213 ▲284.85 ▼1.06110.04 ▲0.1642.66 ▼1.85
Posts /wp-admin/edit.php2,093 ▲12.05 ▼0.0036.23 ▼4.9734.19 ▼2.91
Add New Post /wp-admin/post-new.php1,523 ▼1017.51 ▼5.53701.75 ▲98.3351.12 ▲0.93
Media Library /wp-admin/upload.php1,395 ▲44.23 ▼0.04110.40 ▲13.5948.74 ▲5.69
WP Flexslider /wp-admin/options-general.php?page=wp-flexslider9352.0228.7229.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-flexslider/inc/public/main.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: gallery, flexslider, slider

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

The main file in "WP Flexslider" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
32 characters long description:
Flexslider for WordPress Gallery

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected2,006 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4147134980
PHP6147229577
CSS3638277
PO File1293875
Sass26367
SVG10019
JSON10011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity11.33
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bg_play_pause.png1.51KB0.52KB▼ 65.52%