10% auto-expire-widget

Code Review | Auto Expire Widget

WordPress plugin Auto Expire Widget scored10%from 54 tests.

About plugin

  • Plugin page: auto-expire-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 18, 2013
  • Latest release: Nov 27, 2014
  • Number of updates: 7
  • Update frequency: every 62.2 days
  • Top authors: nishantsharma1610 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/auto-expire-widget/autoexpirewidget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_autoexpirewidget has a deprecated constructor

Server metrics [RAM: ▼2.20MB] [CPU: ▼63.38ms] Passed 4 tests

An overview of server-side resources used by Auto Expire Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.654.25 ▼40.45
Dashboard /wp-admin2.10 ▼1.535.48 ▼62.72
Posts /wp-admin/edit.php2.10 ▼1.587.05 ▼45.14
Add New Post /wp-admin/post-new.php2.10 ▼4.055.10 ▼105.19
Media Library /wp-admin/upload.php2.10 ▼1.397.19 ▼32.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Expire Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.061.90 ▲0.0238.07 ▼2.71
Dashboard /wp-admin2,198 ▲185.65 ▲0.0489.77 ▼3.1640.77 ▼2.69
Posts /wp-admin/edit.php2,103 ▲32.18 ▲0.1740.47 ▲1.2137.61 ▲3.97
Add New Post /wp-admin/post-new.php1,533 ▼723.20 ▲4.85599.95 ▼40.4652.76 ▼18.82
Media Library /wp-admin/upload.php1,394 ▼64.20 ▼0.0196.79 ▼3.7146.38 ▲0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/auto-expire-widget/autoexpirewidget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_autoexpirewidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_wp_autoexpirewidget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/auto-expire-widget/autoexpirewidget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: auto widget expire, widget, auto widget, auto, auto widget expire datewise...

auto-expire-widget/autoexpirewidget.php 92% from 13 tests

The main PHP script in "Auto Expire Widget" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("auto-expire-widget.php" instead of "autoexpirewidget.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
Good job! No executable or dangerous file extensions detected74 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131774

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin