10% tryst

Code Review | Tryst

WordPress plugin Tryst scored10%from 54 tests.

About plugin

  • Plugin page: tryst
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2020
  • Latest release: Oct 18, 2020
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: mbsdevel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/tryst/includes/class-tryst.php+349
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.71MB] [CPU: ▼55.38ms] Passed 4 tests

This is a short check of server-side resources used by Tryst
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.176.73 ▼34.45
Dashboard /wp-admin2.31 ▼1.037.66 ▼59.13
Posts /wp-admin/edit.php2.31 ▼1.046.36 ▼40.72
Add New Post /wp-admin/post-new.php2.31 ▼3.587.55 ▼87.20
Media Library /wp-admin/upload.php2.31 ▼0.927.18 ▼27.54
All meetings /wp-admin/edit.php?post_type=tryst2.317.89
New /wp-admin/post-new.php?post_type=tryst2.317.63
Tryst /wp-admin/options-general.php?page=tryst-setting-admin2.316.86
Agenda /wp-admin/edit-tags.php?taxonomy=agenda&post_type=tryst2.318.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 114 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
category_children
tryst_option
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Tryst
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.24 ▼1.1814.74 ▲13.0841.19 ▼2.79
Dashboard /wp-admin2,245 ▲605.79 ▼0.02104.01 ▼2.9038.68 ▼1.62
Posts /wp-admin/edit.php2,146 ▲542.06 ▼0.0837.58 ▼1.8832.42 ▼4.12
Add New Post /wp-admin/post-new.php1,550 ▲3622.78 ▲5.26688.20 ▲59.9563.31 ▲4.37
Media Library /wp-admin/upload.php1,427 ▲364.15 ▼0.0996.87 ▼1.3243.67 ▼1.09
All meetings /wp-admin/edit.php?post_type=tryst1,1011.9735.6736.51
New /wp-admin/post-new.php?post_type=tryst1,6962.7753.2157.91
Tryst /wp-admin/options-general.php?page=tryst-setting-admin8932.0628.9327.16
Agenda /wp-admin/edit-tags.php?taxonomy=agenda&post_type=tryst1,3802.1426.8632.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/tryst/includes/class-tryst.php+349
    Illegal string offset 'form_country'
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • category_children
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • tryst_option

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=agenda&post_type=tryst
    • > Warning in wp-content/plugins/tryst/includes/class-tryst.php+349
    Illegal string offset 'form_country'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=agenda&post_type=tryst
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
    • > GET request to /wp-admin/post-new.php?post_type=tryst
    • > Notice in wp-content/plugins/tryst/includes/class-tryst-i18n.php+266
    Undefined index: a

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tryst/public/partials/tryst-public-display.php
    • > /wp-content/plugins/tryst/admin/partials/tryst-admin-display.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: agenda in wp-content/plugins/tryst/public/templates/form-meeting.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tryst/public/templates/modal-form-meeting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tryst/public/templates/pt-BR/fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tryst/public/templates/en-US/fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function getPreviousMonthLink() on null in wp-content/plugins/tryst/public/templates/calendar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Tryst\\is_admin() in wp-content/plugins/tryst/includes/class-tryst-settings.php:287
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tryst/public/templates/en-US/Domain/fields.php:1
    • > PHP Notice
      Undefined variable: agenda in wp-content/plugins/tryst/public/templates/calendar.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tryst/public/templates/pt-BR/Domain/fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function getOptions() on null in wp-content/plugins/tryst/public/templates/form-meeting.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
4 plugin tags: member, meeting, tryst, calendar

tryst/tryst.php 92% from 13 tests

The entry point to "Tryst" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Make the plugin description longer than 10 characters (currently 8 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected16,206 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript443421,1717,374
JSON3005,745
PHP354459572,210
CSS87716542
PO File17275157
HTML180126
Sass19052

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.70
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods175
▷ Static methods2313.14%
▷ Public methods16192.00%
▷ Protected methods10.57%
▷ Private methods137.43%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/calendar-1.png17.68KB8.33KB▼ 52.87%
public/img/keys-small.png4.60KB2.35KB▼ 48.89%
public/jQuery-Validation-Engine-master/css/screenshot.png34.99KB10.34KB▼ 70.44%
public/img/calendar-1-small.png1.04KB0.70KB▼ 32.49%
public/img/debut_light.png19.00KB19.63KB0.00%