84% clear-fields

Code Review | Clear Fields

WordPress plugin Clear Fields scored84%from 54 tests.

About plugin

  • Plugin page: clear-fields
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 23, 2013
  • Latest release: Aug 26, 2013
  • Number of updates: 4
  • Update frequency: every 39.0 days
  • Top authors: bstaruk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /904 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲2.33ms] Passed 4 tests

Server-side resources used by Clear Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.70 ▼0.79
Dashboard /wp-admin3.31 ▲0.0150.04 ▲2.88
Posts /wp-admin/edit.php3.36 ▲0.0044.72 ▲4.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.31 ▲3.16
Media Library /wp-admin/upload.php3.23 ▲0.0039.70 ▲4.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Clear Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13513.61 ▼1.009.07 ▲7.2944.45 ▼1.15
Dashboard /wp-admin2,206 ▲155.81 ▼0.0999.11 ▼1.4338.41 ▼4.52
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.1735.72 ▲0.4734.40 ▲4.77
Add New Post /wp-admin/post-new.php1,514 ▼017.86 ▲0.23620.45 ▲4.1449.85 ▼9.35
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0596.50 ▼0.4443.36 ▼1.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/clear-fields/Clear-Fields.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

clear-fields/Clear-Fields.php 92% from 13 tests

The main PHP script in "Clear Fields" version 1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("clear-fields.php" instead of "Clear-Fields.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 detected34 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16820
JavaScript10014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin