84% reset-gravity-forms-views

Code Review | Clear Debug.log Cron

WordPress plugin Clear Debug.log Cron scored 84% from 54 tests.

About plugin

  • Plugin page: reset-gravity-for...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8.2
  • WordPress version: 5.8.1
  • First release: Oct 4, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: citywanderer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 409 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: ▼146.78ms] Passed 4 tests

Server-side resources used by Clear Debug.log Cron
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.37 ▲12.62
Dashboard /wp-admin3.08 ▲0.0244.91 ▲2.58
Posts /wp-admin/edit.php3.13 ▲0.0141.94 ▼9.13
Add New Post /wp-admin/post-new.php5.43 ▼0.0087.02 ▼573.96
Media Library /wp-admin/upload.php3.02 ▲0.0225.23 ▼6.62
Reset GF Views /wp-admin/options-general.php?page=wh_gf_views_cron_settings2.9926.81

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
wh_gf_views_cron_settings

Browser metrics Passed 4 tests

Checking browser requirements for Clear Debug.log Cron
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲7115.87 ▼0.198.78 ▲0.2150.79 ▲7.26
Dashboard /wp-admin2,972 ▲385.96 ▲0.01132.01 ▼20.38104.77 ▼9.87
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0064.31 ▼0.1693.53 ▲7.75
Add New Post /wp-admin/post-new.php1,675 ▲318.84 ▼0.02359.26 ▼10.41113.48 ▼1.63
Media Library /wp-admin/upload.php1,815 ▲85.01 ▼0.03144.15 ▼15.31125.50 ▲1.26
Reset GF Views /wp-admin/options-general.php?page=wh_gf_views_cron_settings1,0762.0653.9081.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wh_gf_views_cron_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/reset-gravity-forms-views/reset-gravity-forms-views.php:25

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

reset-gravity-forms-views/reset-gravity-forms-views.php Passed 13 tests

The main PHP script in "Clear Debug.log Cron" version 1.1 is automatically included on every request by WordPress
62 characters long description:
Reset Gravity Forms Views hourly, twicedaily, daily or weekly

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin121 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15527121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected