83% gravity-froms-monthpicker

Code Review | Gravity Forms Addon - Monthpicker

WordPress plugin Gravity Forms Addon - Monthpicker scored83%from 54 tests.

About plugin

  • Plugin page: gravity-froms-mon...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2015
  • Latest release: Apr 27, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: ttsanev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Gravity Forms Addon - Monthpicker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.09 ▼0.98
Dashboard /wp-admin3.31 ▲0.0145.89 ▲0.78
Posts /wp-admin/edit.php3.36 ▲0.0042.78 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.33 ▼20.11
Media Library /wp-admin/upload.php3.23 ▲0.0037.57 ▲3.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Gravity Forms Addon - Monthpicker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.32 ▼0.091.73 ▲0.0745.36 ▲7.52
Dashboard /wp-admin2,198 ▲175.62 ▼0.0984.61 ▼17.3037.00 ▼6.04
Posts /wp-admin/edit.php2,082 ▼182.01 ▲0.0634.41 ▼5.2531.76 ▼1.65
Add New Post /wp-admin/post-new.php1,526 ▼323.35 ▲0.11677.80 ▼10.5551.94 ▼5.09
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.12109.85 ▲11.8847.32 ▲3.94

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GF_Field' not found in wp-content/plugins/gravity-froms-monthpicker/class-gf-field-monthpicker.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-froms-monthpicker/gravityforms-monthpicker.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === gravity-froms-monthpicker === )
Please take inspiration from this readme.txt

gravity-froms-monthpicker/gravityforms-monthpicker.php 77% from 13 tests

This is the main PHP file of "Gravity Forms Addon - Monthpicker" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gravity-froms-monthpicker.php" instead of "gravityforms-monthpicker.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin336 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP35440221
CSS272070
JavaScript1153139
Markdown1406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_0073ea_256x240.png4.44KB4.17KB▼ 6.02%
images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
images/ui-bg_highlight-soft_50_dddddd_1x100.png0.27KB0.14KB▼ 48.21%
images/ui-bg_flat_0_eeeeee_40x100.png0.21KB0.08KB▼ 60.45%
images/ui-icons_666666_256x240.png6.82KB4.17KB▼ 38.82%