79% comment-expirator

Code Review | Comment Expirator

WordPress plugin Comment Expirator scored79%from 54 tests.

About plugin

  • Plugin page: comment-expirator
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Jan 12, 2015
  • Number of updates: 11
  • Update frequency: every 12.6 days
  • Top authors: farne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,275 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.47ms] Passed 4 tests

Server-side resources used by Comment Expirator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.59 ▼2.10
Dashboard /wp-admin3.33 ▲0.0254.61 ▲0.75
Posts /wp-admin/edit.php3.38 ▲0.0251.25 ▼1.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.28 ▲4.35
Media Library /wp-admin/upload.php3.25 ▲0.0241.00 ▲4.85
Comment Expirator /wp-admin/options-general.php?page=comment-expirator3.1929.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment Expirator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.031.94 ▲0.2242.15 ▼3.32
Dashboard /wp-admin2,199 ▲225.65 ▼0.0292.04 ▼8.7046.84 ▲2.98
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0039.51 ▲3.1734.92 ▼2.39
Add New Post /wp-admin/post-new.php1,529 ▲123.09 ▼0.01628.97 ▼51.5465.31 ▲11.36
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.02102.17 ▼11.0443.46 ▼4.52
Comment Expirator /wp-admin/options-general.php?page=comment-expirator8402.0025.8030.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=comment-expirator
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=comment-expirator
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=comment-expirator
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(COMMENT_EXPIRATOR_PLUGIN_PATH/classes/settings.php): failed to open stream: No such file or directory in wp-content/plugins/comment-expirator/classes/comment.php on line 14
    • > PHP Warning
      Use of undefined constant COMMENT_EXPIRATOR_PLUGIN_PATH - assumed 'COMMENT_EXPIRATOR_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/comment-expirator/classes/comment.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'COMMENT_EXPIRATOR_PLUGIN_PATH/classes/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/comment-expirator/classes/comment.php on line 14

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: schedule, posts, scheduling, comments, expire...

comment-expirator/comment-expirator.php Passed 13 tests

The main file in "Comment Expirator" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
The plugin lets you set a specific closing date and time for comments on any post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,531 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22191951,143
PHP4237203344
CSS2141544

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity23.33
▷ Minimum class complexity10.00
▷ Maximum class complexity42.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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