68% typhoon-slider

Code Review | Typhoon Slider

WordPress plugin Typhoon Slider scored 68% from 54 tests.

About plugin

  • Plugin page: typhoon-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2016
  • Latest release: Mar 28, 2016
  • Number of updates: 6
  • Update frequency: every 4.5 days
  • Top authors: promz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 939 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.17MB] [CPU: ▼42.42ms] Passed 4 tests

A check of server-side resources used by Typhoon Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6713.51 ▼32.09
Dashboard /wp-admin2.84 ▼0.4618.24 ▼30.31
Posts /wp-admin/edit.php2.84 ▼0.5116.25 ▼35.64
Add New Post /wp-admin/post-new.php2.84 ▼3.0521.19 ▼71.62
Media Library /wp-admin/upload.php2.84 ▼0.3915.18 ▼20.84
All Slider /wp-admin/edit.php?post_type=typhoon_slider2.8417.04
Add New /wp-admin/post-new.php?post_type=typhoon_slider2.8416.83

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Typhoon Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,063 ▲32815.29 ▲1.005.87 ▲3.9639.37 ▼5.67
Dashboard /wp-admin2,373 ▲1826.59 ▲1.69124.75 ▲18.0443.90 ▼0.19
Posts /wp-admin/edit.php2,282 ▲1933.40 ▲1.3945.84 ▲3.2929.09 ▼6.20
Add New Post /wp-admin/post-new.php1,578 ▲3618.74 ▲0.30595.52 ▼53.3733.61 ▼22.27
Media Library /wp-admin/upload.php1,415 ▲274.18 ▲0.0079.89 ▼17.3246.22 ▲1.13
All Slider /wp-admin/edit.php?post_type=typhoon_slider1,2543.2848.9129.03
Add New /wp-admin/post-new.php?post_type=typhoon_slider2,2274.1679.1583.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/typhoon-slider/CMF/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=typhoon_slider
    • > Warning in wp-content/plugins/typhoon-slider/CMF/init.php+746
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/post-new.php?post_type=typhoon_slider
    • > Notice in wp-content/plugins/typhoon-slider/init.php+236
    Undefined index: ts_content

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/typhoon-slider/CMF/CMF/init.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/typhoon-slider/CMF/metabox-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/typhoon-slider/init.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/typhoon-slider/content-metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/typhoon-slider/CMF/CMF/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/typhoon-slider/CMF/init.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: bxslider, htmlslider, slider, carousel, fadeslider

typhoon-slider/init.php 92% from 13 tests

The main PHP script in "Typhoon Slider" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("typhoon-slider.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected7,529 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,0381,7683,632
JavaScript83734932,474
CSS51491011,277
Markdown1350146

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity65.73
▷ Minimum class complexity20.00
▷ Maximum class complexity177.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods241
▷ Static methods13053.94%
▷ Public methods23195.85%
▷ Protected methods20.83%
▷ Private methods83.32%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
33 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CMF/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
bxslider/images/controls.png2.74KB1.42KB▼ 48.29%
CMF/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
CMF/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
CMF/CMF/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%