84% auto-post-expiration

Code Review | Auto Post Expiration

WordPress plugin Auto Post Expiration scored84%from 54 tests.

About plugin

  • Plugin page: auto-post-expiration
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2021
  • Latest release: Jun 8, 2023
  • Number of updates: 19
  • Update frequency: every 44.2 days
  • Top authors: viitorcloudvc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,339 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.65ms] Passed 4 tests

Analyzing server-side resources used by Auto Post Expiration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.32 ▲3.21
Dashboard /wp-admin3.32 ▲0.0147.02 ▼3.31
Posts /wp-admin/edit.php3.37 ▲0.0144.70 ▼1.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.47 ▼8.84
Media Library /wp-admin/upload.php3.24 ▲0.0133.14 ▼0.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Auto Post Expiration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.071.85 ▲0.3045.46 ▲5.34
Dashboard /wp-admin2,209 ▲215.86 ▼0.0295.40 ▼9.9937.41 ▼7.55
Posts /wp-admin/edit.php2,095 ▲62.01 ▲0.0134.80 ▼10.0433.18 ▼6.65
Add New Post /wp-admin/post-new.php7,182 ▲5,65419.20 ▲0.99925.99 ▲294.7864.24 ▲8.58
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0198.56 ▲0.8043.26 ▼0.97

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/auto-post-expiration/auto-post-expire-options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: expire, set_post_expire, expire_event, post_expire_date, post_expire...

auto-post-expiration/auto-post-expiration.php Passed 13 tests

The main file in "Auto Post Expiration" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
119 characters long description:
This simple plugin allows to set expiry date of post and it set post to "draft" status automatic on desire expire date.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,608 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2172451,468
PHP34398139
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin