74% sugar-events-calendar-ninja-forms-add-on

Code Review | Sugar Events Calendar - Ninja Forms Add-on

WordPress plugin Sugar Events Calendar - Ninja Forms Add-on scored74%from 54 tests.

About plugin

  • Plugin page: sugar-events-cale...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 6.3.1
  • First release: Apr 24, 2014
  • Latest release: Apr 24, 2014
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: ericdaams (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,092 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.24MB] [CPU: ▼44.71ms] Passed 4 tests

This is a short check of server-side resources used by Sugar Events Calendar - Ninja Forms Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7313.15 ▼29.00
Dashboard /wp-admin2.77 ▼0.5316.56 ▼35.24
Posts /wp-admin/edit.php2.77 ▼0.5816.55 ▼29.62
Add New Post /wp-admin/post-new.php2.77 ▼3.1117.21 ▼84.99
Media Library /wp-admin/upload.php2.77 ▼0.4614.96 ▼22.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Sugar Events Calendar - Ninja Forms Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.231.96 ▼0.0142.14 ▼1.34
Dashboard /wp-admin2,206 ▲215.83 ▲0.79101.29 ▼7.4440.37 ▼6.25
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0635.32 ▲0.5332.60 ▼3.41
Add New Post /wp-admin/post-new.php1,533 ▲823.03 ▼0.19648.60 ▼37.0451.89 ▲0.23
Media Library /wp-admin/upload.php1,385 ▼04.22 ▲0.0095.77 ▼9.5944.33 ▲0.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/sugar-events-calendar-ninja-forms-add-on/sugar-calendar-ninja-forms.php+19
    Use of undefined constant SC_PLUGIN_FILE - assumed 'SC_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sugar-events-calendar-ninja-forms-add-on/sugar-calendar-ninja-forms.php:22

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: event registration, event ticketing, event calendar, ninja forms, sugar events calendar...

sugar-events-calendar-ninja-forms-add-on/sugar-calendar-ninja-forms.php 85% from 13 tests

This is the main PHP file of "Sugar Events Calendar - Ninja Forms Add-on" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sugar-events-calendar-ninja-forms-add-on.php" instead of "sugar-calendar-ninja-forms.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.7" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin57 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP172623
PO File11118
Markdown112016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected