10% cf7-4dem-it-extension

Code Review | Contact Form 7 4Dem.it Extension

WordPress plugin Contact Form 7 4Dem.it Extension scored10%from 54 tests.

About plugin

  • Plugin page: cf7-4dem-it-exten...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 19, 2017
  • Latest release: Jul 25, 2022
  • Number of updates: 21
  • Update frequency: every 91.8 days
  • Top authors: 4marketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,599 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-tools.php+71
    max(): Array must contain at least one element

Server metrics [RAM: ▼1.07MB] [CPU: ▼40.37ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 4Dem.it Extension
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▼0.5615.05 ▼23.41
Dashboard /wp-admin2.94 ▼0.3617.59 ▼33.03
Posts /wp-admin/edit.php2.94 ▼0.4119.61 ▼22.93
Add New Post /wp-admin/post-new.php2.94 ▼2.9418.33 ▼82.11
Media Library /wp-admin/upload.php2.94 ▼0.2920.30 ▼13.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Contact Form 7 4Dem.it Extension: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.17 ▼0.201.75 ▼0.0043.21 ▼0.52
Dashboard /wp-admin2,204 ▲305.59 ▼0.0195.81 ▲5.5944.67 ▲4.26
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0536.58 ▲3.4235.68 ▲1.57
Add New Post /wp-admin/post-new.php1,532 ▲323.20 ▲0.16640.07 ▼20.1652.93 ▲3.06
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0394.28 ▲0.9744.66 ▲5.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-tools.php+71
    max(): Array must contain at least one element
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-enqueue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cf7-4dem-it-extension/cf7-adv-dem-ext.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-activate.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function check_apikey() in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-view.php:21
    • > PHP Warning
      require_once(ADV_DEM_CF7_PLUGIN_DIR/lib/adv-dem-cf7-activate.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ADV_DEM_CF7_PLUGIN_DIR/lib/adv-dem-cf7-activate.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7-tools.php:49
    • > PHP Warning
      Use of undefined constant ADV_DEM_CF7_PLUGIN_DIR - assumed 'ADV_DEM_CF7_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-4dem-it-extension/lib/adv-dem-cf7.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

cf7-4dem-it-extension/cf7-adv-dem-ext.php 77% from 13 tests

This is the main PHP file of "Contact Form 7 4Dem.it Extension" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-4dem-it-extension.php" instead of "cf7-adv-dem-ext.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,299 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP82181381,058
PO File14447116
CSS1180103
JavaScript116022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods4384.31%
▷ Protected methods00.00%
▷ Private methods815.69%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png11.41KB4.99KB▼ 56.26%
assets/icon-256x256.png26.02KB11.16KB▼ 57.11%