73% cf7-mobile-notification

Code Review | Contact Form 7 Database & Mobile App - CF7 DB & App

WordPress plugin Contact Form 7 Database & Mobile App - CF7 DB & App scored 73% from 54 tests.

About plugin

  • Plugin page: cf7-mobile-notifi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.6
  • WordPress version: 6.3.1
  • First release: Jul 12, 2020
  • Latest release: Mar 10, 2021
  • Number of updates: 14
  • Update frequency: every 17.5 days
  • Top authors: dacalleg (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 1,125 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.63MB] [CPU: ▼14.85ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 Database & Mobile App - CF7 DB & App
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.34 ▼2.67
Dashboard /wp-admin3.33 ▲0.0246.40 ▼3.26
Posts /wp-admin/edit.php3.38 ▲0.0245.20 ▼2.62
Add New Post /wp-admin/post-new.php3.30 ▼2.5938.51 ▼50.84
Media Library /wp-admin/upload.php3.25 ▲0.0235.65 ▲0.31
CF7 Mobile App /wp-admin/options-general.php?page=cf7_mobile_notification3.2130.93

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 21 new files
Database: 4 new tables, 9 new options
New tables
wp_cf7_mobile_notification_devices
wp_cf7_mobile_notification_forms_data
wp_cf7_mobile_notification_device_notifications
wp_cf7_mobile_notification_devices_forms
New WordPress options
widget_recent-posts
cf7_mobile_notification_settings
cf7_mobile_notification_secret_key
theysaidso_admin_options
cf7_mobile_notification_db_version
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 Database & Mobile App - CF7 DB & App
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.171.60 ▼0.4141.09 ▼4.26
Dashboard /wp-admin2,213 ▲374.85 ▼0.0897.85 ▼22.2541.80 ▼27.14
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0138.20 ▼4.0733.46 ▼3.42
Add New Post /wp-admin/post-new.php1,536 ▲323.12 ▼0.35663.00 ▲38.0950.18 ▼9.66
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0296.51 ▲2.3441.51 ▼3.63
CF7 Mobile App /wp-admin/options-general.php?page=cf7_mobile_notification7812.0125.2930.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 4 tables
    • wp_cf7_mobile_notification_device_notifications
    • wp_cf7_mobile_notification_forms_data
    • wp_cf7_mobile_notification_devices
    • wp_cf7_mobile_notification_devices_forms
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • cf7_mobile_notification_secret_key
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • cf7_mobile_notification_settings
    • can_compress_scripts
    • cf7_mobile_notification_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cf7-mobile-notification/cf7-mobile-notification.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Cf7MobileNotification\otification\otificator' not found in wp-content/plugins/cf7-mobile-notification/includes/Notification/PushNotificator.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: The official readme.txt might help

cf7-mobile-notification/cf7-mobile-notification.php 85% from 13 tests

"Contact Form 7 Database & Mobile App - CF7 DB & App" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/cf7_mobile_notification")

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
No dangerous file extensions were detected1,235 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP173174371,219
JSON20016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.58
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods90
▷ Static methods910.00%
▷ Public methods6976.67%
▷ Protected methods22.22%
▷ Private methods1921.11%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants39
▷ Global constants00.00%
▷ Class constants39100.00%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin