78% instasport-calendar

Code Review | Instasport Calendar

WordPress plugin Instasport Calendar scored78%from 54 tests.

About plugin

  • Plugin page: instasport-calendar
  • Plugin version: 2.1.10
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.6.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2021
  • Latest release: Apr 13, 2023
  • Number of updates: 14
  • Update frequency: every 55.1 days
  • Top authors: instasport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /553 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼7.44ms] Passed 4 tests

Analyzing server-side resources used by Instasport Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3341.04 ▼1.16
Dashboard /wp-admin3.68 ▲0.3052.81 ▼14.22
Posts /wp-admin/edit.php3.80 ▲0.4052.29 ▲0.74
Add New Post /wp-admin/post-new.php6.26 ▲0.3495.65 ▼15.12
Media Library /wp-admin/upload.php3.61 ▲0.3441.20 ▲5.87
Instasport Calendar /wp-admin/options-general.php?page=insta_calendar3.5741.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Instasport Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▼0.161.62 ▲0.0043.72 ▲0.85
Dashboard /wp-admin2,202 ▲255.61 ▼0.0694.50 ▲6.0840.64 ▼4.38
Posts /wp-admin/edit.php2,104 ▲42.14 ▲0.1339.97 ▲4.2636.88 ▲1.52
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▼0.31655.58 ▼53.6253.21 ▲1.85
Media Library /wp-admin/upload.php1,404 ▲14.15 ▼0.0294.80 ▼2.7445.41 ▼0.88
Instasport Calendar /wp-admin/options-general.php?page=insta_calendar8462.1224.5130.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/instasport-calendar/templates/week.php
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/m_event.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/m_visits.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instasport-calendar/ajax.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/m_email.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/instasport-calendar/instasport-calendar.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/instasport-calendar/shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/m_card.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/button_profile.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/button_pilot.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instasport-calendar/templates/filters.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: No tags were detected
You can take inspiration from this readme.txt

instasport-calendar/instasport-calendar.php 92% from 13 tests

The main PHP script in "Instasport Calendar" version 2.1.10 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
There were no executable files found in this plugin9,732 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49595925,994
PHP342242062,085
CSS1212151,162
PO File2272393467
Markdown120024

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity62.75
▷ Minimum class complexity7.00
▷ Maximum class complexity203.00
Average method complexity6.71
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods4497.78%
▷ Protected methods00.00%
▷ Private methods12.22%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/card.png1.69KB1.56KB▼ 7.47%