67% touchbase-mail-subscribe-form

Code Review | TouchBase Mail Subscribe Form

WordPress plugin TouchBase Mail Subscribe Form scored67%from 54 tests.

About plugin

  • Plugin page: touchbase-mail-su...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 30, 2018
  • Latest release: Aug 30, 2018
  • Number of updates: 6
  • Update frequency: every 2.7 days
  • Top authors: touchbasedacotah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /883 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.96MB] [CPU: ▼56.38ms] Passed 4 tests

Server-side resources used by TouchBase Mail Subscribe Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.91 ▼35.64
Dashboard /wp-admin2.05 ▼1.266.67 ▼43.37
Posts /wp-admin/edit.php2.05 ▼1.316.36 ▼51.67
Add New Post /wp-admin/post-new.php2.05 ▼3.846.40 ▼94.83
Media Library /wp-admin/upload.php2.05 ▼1.184.96 ▼28.89
TouchBase Mail /wp-admin/options-general.php?page=touchbasemail-subscribe-form2.055.22

Server storage [IO: ▲0.04MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TouchBase Mail Subscribe Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.161.71 ▲0.0139.07 ▼5.18
Dashboard /wp-admin2,210 ▲195.85 ▲0.94100.80 ▼4.6639.02 ▼0.99
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0638.33 ▲1.0536.80 ▲3.17
Add New Post /wp-admin/post-new.php1,546 ▲2718.06 ▼5.21628.43 ▼55.4856.16 ▲4.57
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0698.40 ▼0.8642.31 ▼5.71
TouchBase Mail /wp-admin/options-general.php?page=touchbasemail-subscribe-form7922.0328.3128.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the touchbasemail-shortcode handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=touchbasemail-subscribe-form
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the touchbasemail-shortcode handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=touchbasemail-subscribe-form
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the touchbasemail-shortcode-wide handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=touchbasemail-subscribe-form
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the touchbasemail-shortcode-vertical handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/touchbase-mail-subscribe-form/trunk/touchbasemail-subscribe-form.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/touchbase-mail-subscribe-form/includes/shortcode.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/touchbase-mail-subscribe-form/trunk/includes/shortcode.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/touchbase-mail-subscribe-form/includes/options.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/touchbase-mail-subscribe-form/trunk/includes/options.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/touchbase-mail-subscribe-form/touchbasemail-subscribe-form.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt might help

touchbase-mail-subscribe-form/touchbasemail-subscribe-form.php 77% from 13 tests

The entry point to "TouchBase Mail Subscribe Form" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("touchbase-mail-subscribe-form.php" instead of "touchbasemail-subscribe-form.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")

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 detected325 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33471162
CSS321884
JavaScript1221779

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin