84% cyclone-widget

Code Review | Cyclone Widgets

WordPress plugin Cyclone Widgets scored84%from 54 tests.

About plugin

  • Plugin page: cyclone-widget
  • Plugin version: 0.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Oct 1, 2019
  • Number of updates: 7
  • Update frequency: every 76.1 days
  • Top authors: cyclonetheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.85ms] Passed 4 tests

A check of server-side resources used by Cyclone Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.46 ▼5.28
Dashboard /wp-admin3.51 ▲0.2147.38 ▼3.49
Posts /wp-admin/edit.php3.62 ▲0.2749.91 ▲3.13
Add New Post /wp-admin/post-new.php6.09 ▲0.2192.78 ▲0.25
Media Library /wp-admin/upload.php3.43 ▲0.2136.62 ▲1.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_cyclone_instagram_loaded_widget
can_compress_scripts
widget_cyclone_recent_posts_widget
db_upgraded
widget_recent-posts
widget_cyclone_custom_post_widget
widget_cyclone_recent_popular_posts_widget
widget_cyclone_social_links_news_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Cyclone Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17714.00 ▼0.738.25 ▲5.9539.47 ▼6.34
Dashboard /wp-admin2,209 ▲214.83 ▼0.05107.77 ▼0.5541.07 ▼0.95
Posts /wp-admin/edit.php2,092 ▼01.97 ▼0.0039.31 ▲3.3835.83 ▲0.38
Add New Post /wp-admin/post-new.php1,514 ▼2817.37 ▼0.79580.57 ▼8.7170.99 ▲7.92
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.02100.51 ▼2.1541.24 ▼5.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_cyclone_instagram_loaded_widget
    • widget_cyclone_social_links_news_widget
    • widget_cyclone_recent_popular_posts_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_cyclone_custom_post_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_cyclone_recent_posts_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cyclone-widget/theme/inc/demo-content/demo.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cyclone-widget/theme/inc/widgets/sidebar-toggle-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cyclone-widget/theme/inc/widgets/recent-post-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/index.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/widgets/insta_widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/widgets/social_links.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/widgets/post-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/widgets/popular-recent.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/theme/inc/cyclone-customizer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyclone-widget/widgets/recent_posts.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: cyclone, post, widget, themes

cyclone-widget/index.php 92% from 13 tests

The main PHP file in "Cyclone Widgets" ver. 0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cyclone-widget.php" instead of "index.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
There were no executable files found in this plugin6,733 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
XML162322,340
CSS324182,112
PHP16349771,554
SVG100640
JavaScript3201187

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity22.33
▷ Minimum class complexity6.00
▷ Maximum class complexity48.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin