83% targetsms-ru-contact-form-7

Code Review | TargetSMS.ru: СМС-рассылки и уведомления из Contact Form 7

WordPress plugin TargetSMS.ru: СМС-рассылки и уведомления из Contact Form 7 scored 83% from 54 tests.

About plugin

  • Plugin page: targetsms-ru-cont...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-6.0
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: May 11, 2022
  • Number of updates: 3
  • Update frequency: every 16.7 days
  • Top authors: targetsms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▲0.22ms] Passed 4 tests

A check of server-side resources used by TargetSMS.ru: СМС-рассылки и уведомления из Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.46 ▲2.75
Dashboard /wp-admin3.53 ▲0.2350.01 ▲1.34
Posts /wp-admin/edit.php3.64 ▲0.2944.22 ▼1.63
Add New Post /wp-admin/post-new.php6.11 ▲0.2288.17 ▼1.57
Media Library /wp-admin/upload.php3.45 ▲0.2238.79 ▲2.92

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: 2 new tables, 6 new options
New tables
wp_aomailer_cf_settings
wp_aomailer_cf_form_settings
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for TargetSMS.ru: СМС-рассылки и уведомления из Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.74 ▲0.361.84 ▼0.0143.97 ▼3.32
Dashboard /wp-admin2,222 ▲305.79 ▲0.86106.76 ▼1.1137.80 ▲0.34
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0236.56 ▲1.9635.20 ▲0.51
Add New Post /wp-admin/post-new.php1,546 ▲1223.33 ▲0.11680.19 ▲19.8055.19 ▼2.54
Media Library /wp-admin/upload.php1,404 ▲164.14 ▲0.0195.74 ▼17.3141.82 ▼4.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Good news, no errors were detected

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
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/targetsms-ru-contact-form-7/views/sms_page/__sms_settings.php:2
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/targetsms-ru-contact-form-7/views/sms_page/__sms_templates.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/targetsms-ru-contact-form-7/views/settings_page_sms.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/targetsms-ru-contact-form-7/views/sms_page/__sms_history.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/targetsms-ru-contact-form-7/views/sms_page/__sms_help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/targetsms-ru-contact-form-7/aomailercf_plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function collect_mail_tags() on null in wp-content/plugins/targetsms-ru-contact-form-7/views/sms_page/__sms_templates.php:2

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 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: targetsms

targetsms-ru-contact-form-7/aomailercf_plugin.php 77% from 13 tests

The main file in "TargetSMS.ru: СМС-рассылки и уведомления из Contact Form 7" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 322 characters long)
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 83 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("targetsms-ru-contact-form-7.php" instead of "aomailercf_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin6,710 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,959
PHP142742842,504
PO File44965001,044
CSS61120197
JavaScript4096

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity60.50
▷ Minimum class complexity14.00
▷ Maximum class complexity113.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods91
▷ Static methods1718.68%
▷ Public methods7683.52%
▷ Protected methods00.00%
▷ Private methods1516.48%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ui/ui-bg_glass_95_fef1ec_1x400.png0.18KB0.15KB▼ 19.35%
assets/img/logo.png7.88KB4.29KB▼ 45.49%
assets/img/ui/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
assets/img/ui/ui-bg_glass_75_e6e6e6_1x400.png0.12KB0.15KB0.00%
assets/img/ui/ui-icons_cd0a0a_256x240.png3.67KB4.17KB0.00%