74% gw-cf7-modal

Code Review | GW CF7 Modal

WordPress plugin GW CF7 Modal scored74%from 54 tests.

About plugin

  • Plugin page: gw-cf7-modal
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Apr 20, 2020
  • Number of updates: 16
  • Update frequency: every 58.6 days
  • Top authors: dakiriki (87.5%)darkogerguric (18.75%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /821 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.68ms] Passed 4 tests

An overview of server-side resources used by GW CF7 Modal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.25 ▼2.55
Dashboard /wp-admin3.11 ▼0.1923.74 ▼27.12
Posts /wp-admin/edit.php3.11 ▼0.2528.36 ▼23.31
Add New Post /wp-admin/post-new.php3.11 ▼2.7830.14 ▼80.70
Media Library /wp-admin/upload.php3.11 ▼0.1225.64 ▼7.57

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/gw-cf7-modal/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by GW CF7 Modal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,038 ▲27714.85 ▲0.422.34 ▲0.6444.58 ▲8.45
Dashboard /wp-admin2,404 ▲2016.71 ▲0.85126.07 ▲17.7939.99 ▼4.84
Posts /wp-admin/edit.php2,309 ▲2093.59 ▲1.5448.73 ▲9.0132.75 ▼5.73
Add New Post /wp-admin/post-new.php1,567 ▲1823.52 ▲5.29628.95 ▲15.6236.56 ▼13.41
Media Library /wp-admin/upload.php1,443 ▲434.27 ▲0.1187.66 ▼12.7140.82 ▼2.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/gw-cf7-modal/admin/options.php+154
    Undefined variable: form_list
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gw-cf7-modal/admin/media_upload.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gw-cf7-modal/admin/options.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gw-cf7-modal/admin/options.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: modal, cf7

gw-cf7-modal/gw_cf7_modal.php 92% from 13 tests

The main PHP script in "GW CF7 Modal" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gw-cf7-modal.php" instead of "gw_cf7_modal.php")

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
Good job! No executable or dangerous file extensions detected569 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP314646404
CSS4152897
JavaScript6242068

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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 images were found in this plugin