52% stonehenge-em-ongoing-events

Code Review | Events Manager - Ongoing Events

WordPress plugin Events Manager - Ongoing Events scored52%from 54 tests.

About plugin

  • Plugin page: stonehenge-em-ong...
  • Plugin version: 1.6.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Mar 16, 2022
  • Number of updates: 39
  • Update frequency: every 25.7 days
  • Top authors: DuisterDenHaag (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,465 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.93MB] [CPU: ▲3.66ms] 75% from 4 tests

An overview of server-side resources used by Events Manager - Ongoing Events
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 7,406.48ms on /wp-admin/admin.php?page=stonehenge-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.9347.60 ▲6.44
Dashboard /wp-admin4.23 ▲0.9256.26 ▲7.04
Posts /wp-admin/edit.php4.34 ▲0.9854.33 ▲4.62
Add New Post /wp-admin/post-new.php6.83 ▲0.9493.59 ▼3.46
Media Library /wp-admin/upload.php4.15 ▲0.9248.92 ▲13.99
EM - Ongoing Events /wp-admin/admin.php?page=stonehenge-em-ongoing-events4.1239.79
Free Support /wp-admin/admin.php?page=stonehenge_forums4.0940.30
 More... /wp-admin/admin.php?page=stonehenge-plugins4.157,406.48

Server storage [IO: ▲3.04MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,128 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Events Manager - Ongoing Events
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.23 ▼1.421.65 ▲0.0639.38 ▼3.41
Dashboard /wp-admin2,232 ▲415.83 ▲0.9496.76 ▼4.0439.55 ▼5.07
Posts /wp-admin/edit.php2,118 ▲292.03 ▼0.0234.88 ▼6.6534.39 ▼1.43
Add New Post /wp-admin/post-new.php1,566 ▲4718.62 ▼4.50582.84 ▼69.8555.82 ▲0.04
Media Library /wp-admin/upload.php1,417 ▲324.24 ▲0.0796.14 ▼4.2142.85 ▼2.81
EM - Ongoing Events /wp-admin/admin.php?page=stonehenge-em-ongoing-events8282.2325.1549.90
Free Support /wp-admin/admin.php?page=stonehenge_forums9262.3727.5844.61
 More... /wp-admin/admin.php?page=stonehenge-plugins1,0402.2225.0844.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/stonehenge-em-ongoing-events/uninstall.php+12
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=stonehenge_forums
    • > Notice in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/class-forum.php+55
    Undefined offset: 1

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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/bin/build_bootstrap.php
    • > /wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/symfony/translation/Resources/bin/translation-status.php
  • 290× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Logger_AbstractLogger' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/symfony/translation/Extractor/PhpExtractor.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Thunder\\Shortcode\\Processor\\ProcessorInterface' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/thunderer/shortcode/src/Processor/Processor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/symfony/css-selector/Node/SelectorNode.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/symfony/translation/Exception/InvalidResourceException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/test/Mustache/Test/Exception/SyntaxExceptionTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Cache_AbstractCache' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Panel' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/server/Puc/v4p6/DebugBar/ThemePanel.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Thunder\\Shortcode\\Shortcode\\ShortcodeInterface' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/thunderer/shortcode/src/Shortcode/ParsedShortcodeInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/test/Mustache/Test/Functional/ObjectSectionTest.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: chained, classes, courses, events manager, multi day

stonehenge-em-ongoing-events/stonehenge-em-ongoing-events.php Passed 13 tests

Analyzing the main PHP file in "Events Manager - Ongoing Events" version 1.6.2
105 characters long description:
Link single events together with one booking form. Perfect for courses, classes, multi-day seminars, etc.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .ms - Maxwell Script in Maxwell Render
      • wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/test/fixtures/templates/alpha.ms
      • wp-content/plugins/stonehenge-em-ongoing-events/stonehenge/vendor/mustache/mustache/test/fixtures/templates/beta.ms
65,466 lines of code in 1,019 files:
LanguageFilesBlank linesComment linesLines of code
PHP5288,62915,60043,097
YAML2909756017,942
JavaScript807884724,547
XSD392482,803
Markdown3167801,824
JSON19001,629
LESS315271,287
CSS859501,215
PO File14165169769
Mustache3610145
Perl114898
XML45097
make12011
Dockerfile1102

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.20
▷ Minimum class complexity1.00
▷ Maximum class complexity309.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
Namespaces79
Interfaces58
Traits1
Classes462
▷ Abstract classes245.19%
▷ Concrete classes43894.81%
▷ Final classes8619.63%
Methods2,640
▷ Static methods2208.33%
▷ Public methods2,09079.17%
▷ Protected methods28010.61%
▷ Private methods27010.23%
Functions231
▷ Named functions8737.66%
▷ Anonymous functions14462.34%
Constants137
▷ Global constants53.65%
▷ Class constants13296.35%
▷ Public constants12594.70%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
stonehenge/assets/images/ui-bg_highlight-hard_100_f6f6f6_1x100.png0.25KB0.11KB▼ 53.39%
stonehenge/assets/images/ui-bg_glass_55_fbf8ee_1x400.png0.33KB0.13KB▼ 60.29%
stonehenge/assets/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
stonehenge/assets/images/ui-bg_highlight-hard_100_eeeeee_1x100.png0.25KB0.14KB▼ 43.65%
stonehenge/assets/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%