84% tangles-events

Code Review | Tangles Events

WordPress plugin Tangles Events scored84%from 54 tests.

About plugin

  • Plugin page: tangles-events
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: Mar 2, 2023
  • Number of updates: 6
  • Update frequency: every 57.0 days
  • Top authors: tintabeeltd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.25ms] Passed 4 tests

This is a short check of server-side resources used by Tangles Events
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2540.43 ▼1.99
Dashboard /wp-admin3.61 ▲0.3048.20 ▼5.69
Posts /wp-admin/edit.php3.66 ▲0.3049.46 ▼0.74
Add New Post /wp-admin/post-new.php6.13 ▲0.2498.52 ▲4.17
Media Library /wp-admin/upload.php3.47 ▲0.2435.80 ▲3.42

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

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

Browser metrics Passed 4 tests

Tangles Events: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.69 ▼0.711.79 ▼0.0440.65 ▼6.12
Dashboard /wp-admin2,209 ▲174.85 ▼0.06107.34 ▼3.0039.18 ▼2.45
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0239.83 ▲0.3636.61 ▲3.24
Add New Post /wp-admin/post-new.php6,261 ▲4,72722.41 ▼0.79850.64 ▲174.4679.14 ▲24.91
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.0896.30 ▼7.8841.89 ▼3.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_tangles_events_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/tangles-events/includes/event_list_compact.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tangles-events/includes/event_list.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tangles-events/includes/event_row_compact.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tangles-events/includes/event_row.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tangles-events/includes/event_list_compact.php:32
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/tangles-events/includes/event_list.php on line 2
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/tangles-events/includes/event_list.php on line 36
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/tangles-events/includes/event_list.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tangles-events/includes/formatters.php:3
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/tangles-events/includes/event_list_compact.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: events, calendar, event

tangles-events/tangles-events.php Passed 13 tests

This is the main PHP file of "Tangles Events" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
122 characters long description:
The Tangles Events plugin fetches public event information from a Tangle Events community and renders as a calendar widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,896 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP94523671,648
CSS350125
JSON20061
Markdown142061
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity122.00
▷ Minimum class complexity14.00
▷ Maximum class complexity230.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods71
▷ Static methods45.63%
▷ Public methods1318.31%
▷ Protected methods5881.69%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin