10% samo-forms

Code Review | SAMO Forms

WordPress plugin SAMO Forms scored10%from 54 tests.

About plugin

  • Plugin page: samo-forms
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 6.3.1
  • First release: Jan 3, 2018
  • Latest release: Jan 8, 2018
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: brunosierra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /996 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/samo-forms/include/install.php+73
    Undefined variable: opt

Server metrics [RAM: ▲0.34MB] [CPU: ▼0.33ms] Passed 4 tests

Analyzing server-side resources used by SAMO Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3750.58 ▲9.70
Dashboard /wp-admin3.68 ▲0.3852.48 ▲0.93
Posts /wp-admin/edit.php3.74 ▲0.3857.74 ▲7.24
Add New Post /wp-admin/post-new.php6.20 ▲0.3186.02 ▼9.61
Media Library /wp-admin/upload.php3.54 ▲0.3138.39 ▲0.11
Mensagens /wp-admin/admin.php?page=idSamoFormsMessage3.5234.74
SAMO Forms /wp-admin/admin.php?page=idSamoForms3.5037.61
Configuração /wp-admin/admin.php?page=idSamoFormsConfig3.4936.17
Formulários /wp-admin/admin.php?page=idSamoFormsForm3.5035.87

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 21 new files
Database: 2 new tables, 7 new options
New tables
wp_samo_post_formularios
wp_samo_post_respostas
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
SAMOFORM
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SAMO Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.34 ▼0.241.69 ▼0.4643.92 ▼3.71
Dashboard /wp-admin2,224 ▲535.59 ▼0.0287.11 ▼13.3438.57 ▼3.43
Posts /wp-admin/edit.php2,138 ▲381.99 ▼0.0239.79 ▲4.2635.72 ▼0.58
Add New Post /wp-admin/post-new.php1,554 ▲1723.71 ▲5.29692.08 ▲15.1260.45 ▼7.88
Media Library /wp-admin/upload.php1,435 ▲354.19 ▼0.0795.62 ▼22.5448.03 ▲2.76
Mensagens /wp-admin/admin.php?page=idSamoFormsMessage9021.6927.4729.24
SAMO Forms /wp-admin/admin.php?page=idSamoForms8831.6929.1429.74
Configuração /wp-admin/admin.php?page=idSamoFormsConfig9932.0022.2731.70
Formulários /wp-admin/admin.php?page=idSamoFormsForm8831.6931.3127.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_samo_post_respostas
    • wp_samo_post_formularios
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • SAMOFORM
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSamoFormsForm
    • > Notice in wp-content/plugins/samo-forms/include/form_management.php+282
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSamoFormsForm
    • > Warning in wp-content/plugins/samo-forms/include/utils.php+13
    session_start(): Cannot start session when headers already sent
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSamoFormsConfig
    • > Notice in wp-content/plugins/samo-forms/include/config_management.php+113
    Undefined index: help_input

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/samo-forms/include/form_management.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'SAMO\\Drivers' not found in wp-content/plugins/samo-forms/drivers/textarea.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'SAMO\\Drivers' not found in wp-content/plugins/samo-forms/drivers/text.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/samo-forms/include/form_management.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/samo-forms/include/message_management.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'SAMO\\Drivers' not found in wp-content/plugins/samo-forms/drivers/select.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/samo-forms/include/form_management.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/samo-forms/include/message_management.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'SAMO\\Drivers' not found in wp-content/plugins/samo-forms/drivers/recaptcha.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/samo-forms/include/config_management.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: e-mail, sistema samo, samo, contact form spam, forms...

samo-forms/samo-forms.php Passed 13 tests

"SAMO Forms" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
136 characters long description:
Plugins para criação de uma servidor de criação de formulários para serem usados dentro do wordpress ou incorporados a outros sites

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,041 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP174351281,961
JavaScript212680

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.90
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods58
▷ Static methods610.34%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions3196.88%
▷ Anonymous functions13.12%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin