72% webcourier

Code Review | WebCourier Plugin

WordPress plugin WebCourier Plugin scored 72% from 54 tests.

About plugin

  • Plugin page: webcourier
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Oct 24, 2016
  • Number of updates: 49
  • Update frequency: every 5.5 days
  • Top authors: dgledson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.63ms] Passed 4 tests

An overview of server-side resources used by WebCourier Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.34 ▼7.17
Dashboard /wp-admin3.34 ▲0.0454.79 ▲5.28
Posts /wp-admin/edit.php3.46 ▲0.1049.64 ▼2.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.60 ▲0.52
Media Library /wp-admin/upload.php3.25 ▲0.0236.13 ▲2.34
WebCourier /wp-admin/admin.php?page=mt-top-level-handle2.055.28
Pesquisas /wp-admin/admin.php?page=sub-page-pesquisa2.056.55
Configurações /wp-admin/admin.php?page=sub-page-config2.055.24

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WebCourier Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲23014.75 ▲0.461.66 ▼0.3243.34 ▼0.51
Dashboard /wp-admin2,371 ▲1806.47 ▲1.59121.37 ▲16.8833.47 ▼10.62
Posts /wp-admin/edit.php2,274 ▲1853.32 ▲1.3348.28 ▲8.5230.08 ▼7.41
Add New Post /wp-admin/post-new.php1,554 ▲3422.39 ▼1.06635.42 ▲16.0235.94 ▼24.43
Media Library /wp-admin/upload.php1,407 ▲164.15 ▼0.1579.98 ▼16.1039.91 ▼1.24
WebCourier /wp-admin/admin.php?page=mt-top-level-handle1,0423.3841.4427.80
Pesquisas /wp-admin/admin.php?page=sub-page-pesquisa9973.4041.7420.16
Configurações /wp-admin/admin.php?page=sub-page-config7372.1613.8420.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_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 webcourier-general-settings handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-pesquisa-add handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-angular handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-angular-controller-pesquisa-add handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-angular-controller-pesquisa-list handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-wizard handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-wizard-page-add handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-sweet-alert handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 webcourier-config handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=mt-top-level-handle
    • > Notice in wp-content/plugins/webcourier/views/geral_webcourier.php+11
    Undefined index: api_key
    • > GET request to /wp-admin/admin.php?page=mt-top-level-handle
    • > Notice in wp-content/plugins/webcourier/views/geral_webcourier.php+61
    Undefined variable: status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > Notice in wp-content/plugins/webcourier/webcourier.php+77
    Undefined variable: api_status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > Notice in wp-content/plugins/webcourier/webcourier.php+96
    Undefined index: api
    • > GET request to /wp-admin/admin.php?page=sub-page-pesquisa
    • > Notice in wp-content/plugins/webcourier/views/pesquisa.php+7
    Trying to get property 'pesquisas' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > Notice in wp-content/plugins/webcourier/views/config.php+6
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > Notice in wp-content/plugins/webcourier/webcourier.php+101
    Trying to get property 'message' of non-object
    • > GET request to /wp-admin/admin.php?page=sub-page-config
    • > Notice in wp-content/plugins/webcourier/webcourier.php+109
    Undefined variable: configs_checked

SRP 0% 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/webcourier/cool-php-captcha-master/captcha.php
    • > /wp-content/plugins/webcourier/cool-php-captcha-master/resources/tools/dictionary-import/importwords.php
    • > /wp-content/plugins/webcourier/cool-php-captcha-master/example-form.php
    • > /wp-content/plugins/webcourier/views/pesquisa_api_error.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-http.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/webcourier/src/geral_webcourier_footer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/webcourier/views/pesquisa_add.php:6
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/webcourier/cool-php-captcha-master/resources/tools/dictionary-import/importwords.php on line 24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/webcourier/cool-php-captcha-master/resources/tools/dictionary-import/importwords.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/webcourier/inc/form_get_email_newsletter.php:32
    • > PHP Notice
      Undefined variable: argc in wp-content/plugins/webcourier/cool-php-captcha-master/resources/tools/dictionary-import/importwords.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_config() in wp-content/plugins/webcourier/views/pesquisa_list.php:6
    • > PHP Warning
      include_once(WEBCOURIER_PLUGIN_DIR/webcourier.php): failed to open stream: No such file or directory in wp-content/plugins/webcourier/views/pesquisa_list.php on line 5
    • > PHP Notice
      Undefined index: search in wp-content/plugins/webcourier/views/pesquisa_edit.php on line 7
    • > PHP Warning
      include_once(): Failed opening 'WEBCOURIER_PLUGIN_DIR/webcourier.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/webcourier/views/pesquisa_list.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: mailin list, user management, webcourier, add users

webcourier/webcourier.php 85% from 13 tests

The main file in "WebCourier Plugin" v. 2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,221 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS2136622,059
PHP1737393,8981,271
JavaScript877348845
Markdown118030
XML20016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods1765.38%
▷ Protected methods934.62%
▷ Private methods00.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants1
▷ Global constants1100.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
No PNG files were detected