78% mailster-gravity-forms

Code Review | Mailster Gravity Forms

WordPress plugin Mailster Gravity Forms scored78%from 54 tests.

About plugin

  • Plugin page: mailster-gravity-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Oct 9, 2022
  • Number of updates: 43
  • Update frequency: every 48.7 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /13,793 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
Install script ran successfully

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

A check of server-side resources used by Mailster Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.33 ▲2.16
Dashboard /wp-admin3.32 ▲0.0155.31 ▲0.61
Posts /wp-admin/edit.php3.37 ▲0.0150.10 ▼1.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.89 ▲4.16
Media Library /wp-admin/upload.php3.24 ▲0.0136.78 ▼1.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mailster Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.15 ▼0.241.53 ▼0.2741.34 ▼4.20
Dashboard /wp-admin2,195 ▲215.57 ▼0.0090.13 ▼0.4540.66 ▼0.48
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0339.96 ▲3.3237.40 ▼1.83
Add New Post /wp-admin/post-new.php1,535 ▲718.26 ▼4.94625.63 ▼90.2370.71 ▲11.43
Media Library /wp-admin/upload.php1,400 ▲34.29 ▲0.09101.02 ▼10.2841.65 ▼5.48

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mailster-gravity-forms/views/page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-gravity-forms/classes/gravity.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: newsletters, newsletter, mailster, email marketing, mailing list

mailster-gravity-forms/mailster-gravity-forms.php 92% from 13 tests

The main PHP file in "Mailster Gravity Forms" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected332 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37417267
Markdown131040
CSS10025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity23.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin