10% widget-rotator

Code Review | Widget Rotator Pro

WordPress plugin Widget Rotator Pro scored 10% from 54 tests.

About plugin

  • Plugin page: widget-rotator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2015
  • Latest release: Aug 7, 2015
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: nanoplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,280 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/widget-rotator/widget_rotator_pro.php+2
    Function create_function() is deprecated

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

This is a short check of server-side resources used by Widget Rotator Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.67 ▼40.24
Dashboard /wp-admin2.16 ▼1.1511.46 ▼38.29
Posts /wp-admin/edit.php2.16 ▼1.206.90 ▼43.57
Add New Post /wp-admin/post-new.php2.16 ▼3.736.34 ▼91.70
Media Library /wp-admin/upload.php2.16 ▼1.077.60 ▼26.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_widget-rotator-pro
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Widget Rotator Pro: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.21 ▼1.432.00 ▲0.0541.75 ▲0.52
Dashboard /wp-admin2,224 ▲395.88 ▲0.98104.39 ▲1.3339.32 ▼2.49
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0339.20 ▼0.5235.29 ▲1.20
Add New Post /wp-admin/post-new.php1,543 ▲1023.40 ▲0.08645.54 ▼9.3156.25 ▲2.77
Media Library /wp-admin/upload.php1,403 ▲244.23 ▲0.0797.11 ▼2.4340.94 ▼0.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/widget-rotator/widget_rotator_pro.php+2
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_widget-rotator-pro
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 3× 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/widget-rotator/widget_rotator_pro.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-rotator/widget_rotator_pro.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/widget-rotator/widget_rotator_pro_settings_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === widget-rotator === )
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to 1.png. Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

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

The primary PHP file in "Widget Rotator Pro" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-rotator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin771 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS12838428
PHP313718292
JavaScript113351

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 compressed PNG files occupy 0.14MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png0.10KB0.13KB0.00%
assets/css/images/ui-bg_glass_75_d0e5f5_1x400.png0.12KB0.16KB0.00%
assets/css/images/ui-bg_flat_55_fbec88_40x100.png0.18KB0.08KB▼ 52.20%
assets/css/images/ui-icons_f9bd01_256x240.png4.27KB4.11KB▼ 3.78%
assets/css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%