10% event-stream-gallery

Code Review | Event Stream Gallery

WordPress plugin Event Stream Gallery scored10%from 54 tests.

About plugin

  • Plugin page: event-stream-gallery
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: May 18, 2017
  • Number of updates: 48
  • Update frequency: every 0.2 days
  • Top authors: lordspace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,151 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.01MB] [CPU: ▼50.33ms] Passed 4 tests

Server-side resources used by Event Stream Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.4910.02 ▼37.71
Dashboard /wp-admin3.00 ▼0.3113.47 ▼39.99
Posts /wp-admin/edit.php3.00 ▼0.3613.52 ▼39.41
Add New Post /wp-admin/post-new.php3.00 ▼2.8912.74 ▼84.19
Media Library /wp-admin/upload.php3.00 ▼0.2317.47 ▼19.84
Settings /wp-admin/admin.php?page=esg_admin_settings3.0112.73
Pro Version /wp-admin/admin.php?page=esg_admin_pro_ver3.0116.17
Help /wp-admin/admin.php?page=esg_admin_help3.0115.69
Categories /wp-admin/edit-tags.php?taxonomy=esg_cat3.0114.01
Tags /wp-admin/edit-tags.php?taxonomy=esg_tag3.0114.23
Galleries /wp-admin/edit.php?post_type=esg_gallery3.0115.41
Add New Gallery /wp-admin/post-new.php?post_type=esg_gallery3.0112.58

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Event Stream Gallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,473 ▲71215.90 ▲1.6315.50 ▲13.0643.96 ▼0.61
Dashboard /wp-admin2,698 ▲5216.87 ▲1.27130.02 ▲29.31108.12 ▲64.05
Posts /wp-admin/edit.php2,599 ▲4993.57 ▲1.5764.18 ▲24.8193.76 ▲54.33
Add New Post /wp-admin/post-new.php1,780 ▲25322.09 ▼1.02691.85 ▼39.6136.64 ▼15.75
Media Library /wp-admin/upload.php1,807 ▲4044.75 ▲0.5595.81 ▼11.9298.73 ▲54.29
Settings /wp-admin/admin.php?page=esg_admin_settings1,7665.71121.7066.39
Pro Version /wp-admin/admin.php?page=esg_admin_pro_ver1,4413.6559.2790.52
Help /wp-admin/admin.php?page=esg_admin_help1,3213.6456.2870.49
Categories /wp-admin/edit-tags.php?taxonomy=esg_cat1,7733.3061.0492.85
Tags /wp-admin/edit-tags.php?taxonomy=esg_tag1,7483.3168.5462.42
Galleries /wp-admin/edit.php?post_type=esg_gallery1,5653.5267.2878.41
Add New Gallery /wp-admin/post-new.php?post_type=esg_gallery2,2364.4988.9197.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=esg_gallery
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/admin.php?page=esg_admin_help
    • > Warning in wp-content/plugins/event-stream-gallery/modules/admin.php+460
    file_get_contents(wp-content/plugins/event-stream-gallery/data/shortcodes.txt): failed to open stream: No such file or directory

SRP 50% 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
The following issues need your attention
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'esg_singleton' not found in wp-content/plugins/event-stream-gallery/lib/log.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'esg_singleton' not found in wp-content/plugins/event-stream-gallery/lib/base.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'esg_module_asset_loader' not found in wp-content/plugins/event-stream-gallery/modules/asset_loader.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/event-stream-gallery/lib/user.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'esg_module_admin' not found in wp-content/plugins/event-stream-gallery/modules/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'esg_singleton' not found in wp-content/plugins/event-stream-gallery/lib/gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'esg_cpt' not found in wp-content/plugins/event-stream-gallery/modules/cpt.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'esg_module_shortcodes' not found in wp-content/plugins/event-stream-gallery/modules/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'esg_singleton' not found in wp-content/plugins/event-stream-gallery/lib/session.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'esg_singleton' not found in wp-content/plugins/event-stream-gallery/lib/mailer.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=esg_gallery
    • > Network (severe)
    wp-content/plugins/event-stream-gallery/share/fonts/fontawesome-webfont.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=esg_gallery
    • > Network (severe)
    wp-content/plugins/event-stream-gallery/share/fonts/fontawesome-webfont.woff - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=esg_gallery
    • > Network (severe)
    wp-content/plugins/event-stream-gallery/share/fonts/fontawesome-webfont.ttf - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Front-end: Upload image page (renderd using a shortcode))
Please take inspiration from this readme.txt

event-stream-gallery/event-stream-gallery.php 85% from 13 tests

The entry point to "Event Stream Gallery" version 1.0.9 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin19,293 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
CSS13442,1757,730
JavaScript251,6439316,794
PHP181,2571,7624,769

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity38.55
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods270
▷ Static methods13148.52%
▷ Public methods270100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants47
▷ Global constants48.51%
▷ Class constants4391.49%
▷ Public constants43100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 1.40MB with 0.62MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png1.01KB1.24KB0.00%
screenshot-3.png1,261.04KB491.16KB▼ 61.05%
screenshot-4.png53.53KB22.92KB▼ 57.18%
screenshot-1.png122.69KB51.11KB▼ 58.34%