78% spirit-events

Code Review | Spirit Events

WordPress plugin Spirit Events scored78%from 54 tests.

About plugin

  • Plugin page: spirit-events
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Nov 21, 2020
  • Number of updates: 6
  • Update frequency: every 23.8 days
  • Top authors: matejpodstrelenec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼0.76ms] Passed 4 tests

Analyzing server-side resources used by Spirit Events
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2045.05 ▲4.07
Dashboard /wp-admin3.48 ▲0.1759.46 ▲2.66
Posts /wp-admin/edit.php3.59 ▲0.2453.70 ▼0.22
Add New Post /wp-admin/post-new.php6.16 ▲0.2792.73 ▼6.50
Media Library /wp-admin/upload.php3.40 ▲0.1739.70 ▲1.04
Add New /wp-admin/post-new.php?post_type=spirit-events6.1589.60
Settings /wp-admin/edit.php?post_type=spirit-events&page=tssev_settings_page3.3735.16
Events /wp-admin/edit.php?post_type=spirit-events3.4538.09

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: 1 new table, 9 new options
New tables
wp_spirit_event
New WordPress options
db_upgraded
can_compress_scripts
widget_spirit_events
widget_theysaidso_widget
theysaidso_admin_options
tssev_options
tssev_db_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Spirit Events
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲25713.59 ▼0.601.96 ▼0.0142.55 ▼3.16
Dashboard /wp-admin2,416 ▲2105.17 ▲0.29114.46 ▼0.5542.43 ▼0.01
Posts /wp-admin/edit.php2,300 ▲1972.40 ▲0.3436.34 ▼3.5130.01 ▼6.38
Add New Post /wp-admin/post-new.php1,580 ▲5423.28 ▲5.56671.59 ▼21.5639.43 ▼18.77
Media Library /wp-admin/upload.php1,592 ▲1924.52 ▲0.35104.29 ▼16.6042.45 ▼7.62
Add New /wp-admin/post-new.php?post_type=spirit-events6,98020.51931.1240.12
Settings /wp-admin/edit.php?post_type=spirit-events&page=tssev_settings_page1,5192.7463.7230.59
Events /wp-admin/edit.php?post_type=spirit-events1,2572.3834.6627.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • tssev_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_spirit_events
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/spirit-events/spirit-events.php
    • > /wp-content/plugins/spirit-events/includes/functions.php
    • > /wp-content/plugins/spirit-events/admin/admin.php
    • > /wp-content/plugins/spirit-events/templates/settings-page.php
  • 5× 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/spirit-events/includes/metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spirit-events/includes/widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/spirit-events/templates/single-spirit-events.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spirit-events/includes/post-type.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/spirit-events/templates/archive-spirit-events.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

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

The entry point to "Spirit Events" version 1.0.1 is a PHP file that has certain tags in its header comment area
50 characters long description:
Simple event calendar plugin with Gutenberg block.

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
Everything looks great! No dangerous files found in this plugin5,229 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript55581793,305
CSS484201,052
PHP12203160736
PO File15355136

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
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
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/calendar2black.png0.73KB0.55KB▼ 23.55%
src/arrow-right.png0.48KB0.30KB▼ 37.78%
src/calendar2.png1.35KB0.65KB▼ 51.81%
src/map-pin-black.png0.44KB0.48KB0.00%
src/arrow-left.png1.21KB0.29KB▼ 75.63%