90% whatwedo-acf-cleaner

Code Review | whatwedo ACF Cleaner

WordPress plugin whatwedo ACF Cleaner scored90%from 54 tests.

About plugin

  • Plugin page: whatwedo-acf-cleaner
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2021
  • Latest release: Jun 29, 2023
  • Number of updates: 14
  • Update frequency: every 61.9 days
  • Top authors: whatwedo (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /5,543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by whatwedo ACF Cleaner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.75 ▼0.66
Dashboard /wp-admin3.31 ▲0.0143.10 ▼5.81
Posts /wp-admin/edit.php3.36 ▲0.0144.62 ▼2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.45 ▼31.90
Media Library /wp-admin/upload.php3.23 ▲0.0137.80 ▲4.25

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for whatwedo ACF Cleaner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.42 ▼0.241.97 ▲0.3441.44 ▲1.08
Dashboard /wp-admin2,201 ▲215.56 ▼0.0783.11 ▼3.3038.67 ▼4.45
Posts /wp-admin/edit.php2,106 ▲61.94 ▼0.0434.34 ▼6.2735.75 ▲1.52
Add New Post /wp-admin/post-new.php1,536 ▲1023.12 ▼0.50681.75 ▲73.5364.22 ▲13.24
Media Library /wp-admin/upload.php1,406 ▲94.16 ▼0.00112.47 ▲10.1247.31 ▲2.34

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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 errors were detected

Optimizations

Plugin configuration 96% from 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
6 plugin tags: advanced custom fields, cleaner, metadata, admin, cleanup...

whatwedo-acf-cleaner/wwd-acf-cleaner.php 92% from 13 tests

"whatwedo ACF Cleaner" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("whatwedo-acf-cleaner.php" instead of "wwd-acf-cleaner.php")

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 plugin675 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP510761414
JavaScript5146260
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.75
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2170.00%
▷ Protected methods413.33%
▷ Private methods516.67%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
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
There were not PNG files found in your plugin