78% themify-event-post

Code Review | Themify Event Post

WordPress plugin Themify Event Post scored78%from 54 tests.

About plugin

  • Plugin page: themify-event-post
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2018
  • Latest release: Nov 4, 2023
  • Number of updates: 159
  • Update frequency: every 12.0 days
  • Top authors: themifyme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /53,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.00MB] [CPU: ▲0.42ms] Passed 4 tests

A check of server-side resources used by Themify Event Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9446.69 ▲11.34
Dashboard /wp-admin4.38 ▲1.0457.64 ▼2.63
Posts /wp-admin/edit.php4.40 ▲1.0451.76 ▲7.13
Add New Post /wp-admin/post-new.php7.02 ▲1.1486.10 ▼9.14
Media Library /wp-admin/upload.php4.20 ▲0.9741.01 ▲6.32
Add New /wp-admin/post-new.php?post_type=event7.0586.91
Event Tags /wp-admin/edit-tags.php?taxonomy=event-tag&post_type=event4.2842.90
Event Settings /wp-admin/edit.php?post_type=event&page=themify-event-post4.1737.32
Event Categories /wp-admin/edit-tags.php?taxonomy=event-category&post_type=event4.2842.96
Events /wp-admin/edit.php?post_type=event4.3140.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 104 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_themify-event-post
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_themify-event-categories
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themify Event Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17013.35 ▼0.999.02 ▲7.3045.51 ▲8.77
Dashboard /wp-admin2,239 ▲655.63 ▼0.0385.26 ▼10.5237.68 ▼8.30
Posts /wp-admin/edit.php2,136 ▲362.01 ▲0.0634.33 ▼3.2036.10 ▲0.22
Add New Post /wp-admin/post-new.php6,277 ▲4,75118.69 ▼4.20905.96 ▲200.8538.86 ▼21.42
Media Library /wp-admin/upload.php1,442 ▲394.21 ▲0.0196.69 ▼1.5441.99 ▼5.69
Add New /wp-admin/post-new.php?post_type=event2,04717.05987.9257.35
Event Tags /wp-admin/edit-tags.php?taxonomy=event-tag&post_type=event1,4743.2046.4929.50
Event Settings /wp-admin/edit.php?post_type=event&page=themify-event-post1,0251.6624.9830.82
Event Categories /wp-admin/edit-tags.php?taxonomy=event-category&post_type=event1,5023.2645.2530.93
Events /wp-admin/edit.php?post_type=event1,1812.1035.5328.11

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_themify-event-categories
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_themify-event-post
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-event-post/templates/config-shortcode-generator.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-event-post/templates/config-post-meta.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/themify-event-post/templates/content.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-event-post/templates/shortcode.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/themify-event-post/templates/single.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/themify-event-post/templates/widget-posts.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/themify-event-post/templates/template-event-posts.php:14
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/themify-event-post/templates/widget-posts.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/themify-event-post/templates/widget-posts.php on line 41
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/themify-event-post/templates/widget-posts.php on line 41

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/themify-event-post/assets/admin_script.js?ver=1.2.7:20:13)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=event
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

themify-event-post/themify-event-post.php 92% from 13 tests

The main PHP file in "Themify Event Post" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin9,890 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP246949065,806
JavaScript233252522,344
CSS1329471,740

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity37.00
▷ Minimum class complexity1.00
▷ Maximum class complexity172.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods106
▷ Static methods76.60%
▷ Public methods10397.17%
▷ Protected methods00.00%
▷ Private methods32.83%
Functions74
▷ Named functions7398.65%
▷ Anonymous functions11.35%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/themify-metabox/img/ddbtn-cross.png0.18KB0.27KB0.00%
includes/themify-metabox/img/jquery.minicolors.png24.58KB27.69KB0.00%
includes/themify-metabox/img/ddbtn-check.png0.14KB0.23KB0.00%
includes/themify-metabox/img/ddbtn-blank.png0.07KB0.09KB0.00%
includes/themify-metabox/img/icon-delete.png0.45KB0.46KB0.00%