83% mc2p-gravityforms-addon

Code Review | MyChoice2Pay Gravity Forms Add-on

WordPress plugin MyChoice2Pay Gravity Forms Add-on scored83%from 54 tests.

About plugin

  • Plugin page: mc2p-gravityforms...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 4, 2019
  • Latest release: May 19, 2023
  • Number of updates: 8
  • Update frequency: every 199.5 days
  • Top authors: mychoice2pay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 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: ▼1.03ms] Passed 4 tests

Analyzing server-side resources used by MyChoice2Pay Gravity Forms Add-on
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.75 ▼0.74
Dashboard /wp-admin3.31 ▲0.0045.02 ▼2.07
Posts /wp-admin/edit.php3.36 ▲0.0045.06 ▼1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.00100.07 ▲9.66
Media Library /wp-admin/upload.php3.23 ▲0.0032.76 ▲0.07

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by MyChoice2Pay Gravity Forms Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼0.181.90 ▼2.3948.26 ▲4.48
Dashboard /wp-admin2,206 ▲185.83 ▲0.05104.94 ▼10.3141.07 ▼1.74
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0138.71 ▲2.4635.53 ▼1.00
Add New Post /wp-admin/post-new.php1,514 ▼017.79 ▼0.08606.23 ▼65.9350.25 ▼5.93
Media Library /wp-admin/upload.php1,388 ▲64.22 ▼0.1593.09 ▼5.8340.66 ▼4.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc2p-gravityforms-addon/class_gf_mc2p.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc2p-gravityforms-addon/mc2p.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Plugin in Wordpress Dashboard. You have to click on Install now button.), #2 (Configuration page of plugin. Manage your keys and display options.), #3 (Display Pay with MyChoice2Pay on the shopping cart page.)
You can look at the official readme.txt

mc2p-gravityforms-addon/mc2p.php 77% from 13 tests

The main PHP script in "MyChoice2Pay Gravity Forms Add-on" version 0.1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mc2p-gravityforms-addon.php" instead of "mc2p.php")
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,709 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP104677671,696
Markdown112013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.45
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes60
▷ Abstract classes11.67%
▷ Concrete classes5998.33%
▷ Final classes00.00%
Methods163
▷ Static methods63.68%
▷ Public methods14790.18%
▷ Protected methods63.68%
▷ Private methods106.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/mc2p.png2.96KB2.00KB▼ 32.50%