68% seguro-viagem

Code Review | Real Seguro Viagem

WordPress plugin Real Seguro Viagem scored68%from 54 tests.

About plugin

  • Plugin page: seguro-viagem
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Jul 10, 2015
  • Latest release: Jun 5, 2018
  • Number of updates: 6
  • Update frequency: every 177.2 days
  • Top authors: gabrielfengel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,415 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.84ms] Passed 4 tests

A check of server-side resources used by Real Seguro Viagem
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.23 ▼37.46
Dashboard /wp-admin2.11 ▼1.206.82 ▼46.28
Posts /wp-admin/edit.php2.11 ▼1.256.51 ▼41.30
Add New Post /wp-admin/post-new.php2.11 ▼3.786.81 ▼86.30
Media Library /wp-admin/upload.php2.11 ▼1.125.67 ▼30.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Real Seguro Viagem
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲3813.18 ▼1.204.80 ▲2.6445.26 ▼1.19
Dashboard /wp-admin2,215 ▲274.95 ▼0.84108.69 ▲5.2364.89 ▲22.82
Posts /wp-admin/edit.php2,104 ▲152.21 ▲0.1637.51 ▲2.7932.70 ▼3.65
Add New Post /wp-admin/post-new.php1,522 ▲217.71 ▼5.38685.27 ▼35.6955.00 ▼1.06
Media Library /wp-admin/upload.php1,402 ▲174.18 ▼0.1099.07 ▼3.5266.33 ▲22.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > 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 postbox 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
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/seguro-viagem/view/site/front.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: str in wp-content/plugins/seguro-viagem/view/admin/form.php on line 11
    • > PHP Fatal error
      Trait 'RTI\\PublicVars' not found in wp-content/plugins/seguro-viagem/class/TI_Strings.php on line 5
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/seguro-viagem/view/admin/content.php on line 2
    • > PHP Notice
      Undefined variable: token in wp-content/plugins/seguro-viagem/view/site/front.php on line 1
    • > PHP Fatal error
      Trait 'RTI\\PublicVars' not found in wp-content/plugins/seguro-viagem/class/TI_Template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_meta_boxes() in wp-content/plugins/seguro-viagem/view/admin/content.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function t() on null in wp-content/plugins/seguro-viagem/view/admin/form.php:11

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: afiliado, affiliate, programa de afiliao, travel, afiliados...

seguro-viagem/seguro-viagem.php 77% from 13 tests

The entry point to "Real Seguro Viagem" 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:
  • 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 should be prefixed with a forward slash character ("/languages/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")

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
Everything looks great! No dangerous files found in this plugin228 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP106241222
CSS1003
JavaScript1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.65KB0.62KB▼ 4.95%