84% artiss-transient-cleaner

Code Review | Transient Cleaner

WordPress plugin Transient Cleaner scored84%from 54 tests.

About plugin

  • Plugin page: artiss-transient-...
  • Plugin version: 1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 6.3.1
  • First release: Nov 28, 2012
  • Latest release: Oct 9, 2023
  • Number of updates: 329
  • Update frequency: every 12.1 days
  • Top authors: dartiss (77.81%)DarkDesigns (14.59%)codedart (8.21%)

Code review

54 tests

User reviews

22 reviews

Install metrics

900+ active /112,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Transient Cleaner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.88 ▲0.61
Dashboard /wp-admin3.31 ▼0.0448.42 ▼14.21
Posts /wp-admin/edit.php3.36 ▲0.0045.17 ▼1.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.13 ▼13.09
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▲4.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
transient_clean_options
widget_recent-posts
can_compress_scripts
transient_clean_expired
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Transient Cleaner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▼0.011.83 ▲0.1343.48 ▲1.97
Dashboard /wp-admin2,198 ▲265.63 ▼0.0498.05 ▼0.5042.45 ▼2.21
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0333.64 ▼4.3534.29 ▼2.60
Add New Post /wp-admin/post-new.php1,537 ▲1124.91 ▲1.89631.95 ▼20.3864.49 ▲16.68
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.0198.69 ▲2.8541.13 ▼1.82

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

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

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 everything seems fine, this is not an exhaustive test

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/artiss-transient-cleaner/artiss-transient-cleaner.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/artiss-transient-cleaner/includes/set-admin-config.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/artiss-transient-cleaner/includes/options-general.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/artiss-transient-cleaner/includes/clean-transients.php:34

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: options, transient, clean, database, cache

artiss-transient-cleaner/artiss-transient-cleaner.php Passed 13 tests

The main file in "Transient Cleaner" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
🧼 Clear expired transients from your options table.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin445 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6182198445

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected