83% events-for-geodirectory

Code Review | Events Calendar for GeoDirectory

WordPress plugin Events Calendar for GeoDirectory scored83%from 54 tests.

About plugin

  • Plugin page: events-for-geodir...
  • Plugin version: 2.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 27
  • Update frequency: every 38.3 days
  • Top authors: stiofansisland (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /51,352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼2.57ms] Passed 4 tests

Analyzing server-side resources used by Events Calendar for GeoDirectory
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4540.77 ▼0.34
Dashboard /wp-admin3.77 ▲0.4747.39 ▼0.75
Posts /wp-admin/edit.php3.83 ▲0.4650.37 ▼2.10
Add New Post /wp-admin/post-new.php6.29 ▲0.4093.19 ▼7.10
Media Library /wp-admin/upload.php3.64 ▲0.4038.87 ▲8.28
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.8036.01

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Events Calendar for GeoDirectory
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5514.33 ▼0.051.75 ▼0.0243.60 ▼1.40
Dashboard /wp-admin2,225 ▲515.64 ▼0.0091.58 ▲3.2343.05 ▲1.57
Posts /wp-admin/edit.php2,136 ▲362.04 ▲0.1040.25 ▼1.7942.73 ▲6.10
Add New Post /wp-admin/post-new.php1,549 ▲2323.38 ▲0.19686.42 ▲31.3161.35 ▲7.96
Media Library /wp-admin/upload.php1,435 ▲384.25 ▲0.0299.03 ▼4.7746.81 ▲2.12
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9742.0426.8930.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Super_Duper' not found in wp-content/plugins/events-for-geodirectory/includes/widgets/class-geodir-event-widget-schedules.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GeoDir_Admin_Dummy_Data' not found in wp-content/plugins/events-for-geodirectory/includes/admin/dummy-data/standard_events.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/events-for-geodirectory/includes/libraries/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Super_Duper' not found in wp-content/plugins/events-for-geodirectory/includes/widgets/class-geodir-event-widget-ayi.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GeoDir_Admin_Dummy_Data' not found in wp-content/plugins/events-for-geodirectory/includes/admin/dummy-data/recurring_events.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Super_Duper' not found in wp-content/plugins/events-for-geodirectory/includes/widgets/class-geodir-event-widget-calendar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/events-for-geodirectory/includes/libraries/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

events-for-geodirectory/events-for-geodirectory.php 92% from 13 tests

This is the main PHP file of "Events Calendar for GeoDirectory" version 2.3.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin13,210 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP412,2653,51611,000
PO File14706791,172
Sass11230578
JavaScript7177372
CSS319888

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity64.75
▷ Minimum class complexity1.00
▷ Maximum class complexity453.00
Average method complexity6.23
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes13.57%
Methods341
▷ Static methods19356.60%
▷ Public methods29987.68%
▷ Protected methods236.74%
▷ Private methods195.57%
Functions75
▷ Named functions75100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/yui/images/sprite.png3.66KB3.20KB▼ 12.55%