72% crowdcue

Code Review | Crowdcue

WordPress plugin Crowdcue scored72%from 54 tests.

About plugin

  • Plugin page: crowdcue
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2022
  • Latest release: Jun 21, 2022
  • Number of updates: 10
  • Update frequency: every 6.8 days
  • Top authors: kittabit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,059 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.36MB] [CPU: ▲1.70ms] Passed 4 tests

This is a short check of server-side resources used by Crowdcue
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.55 ▲2.0963.56 ▲13.21
Dashboard /wp-admin5.40 ▲2.10839.04 ▲789.18
Posts /wp-admin/edit.php5.43 ▲2.0874.83 ▲22.59
Add New Post /wp-admin/post-new.php5.17 ▼0.7254.48 ▼49.69
Media Library /wp-admin/upload.php5.22 ▲1.9959.19 ▲20.67
Events /wp-admin/edit.php?post_type=og_events5.3556.46
Add New /wp-admin/post-new.php?post_type=og_events5.4171.20

Server storage [IO: ▲27.53MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The filesystem usage should be lower than 25MB (currently using 27.53MB)
Filesystem: 677 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Crowdcue
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,127 ▲38119.33 ▲4.9531.00 ▲29.1740.51 ▼1.08
Dashboard /wp-admin2,498 ▲3109.12 ▲3.24170.77 ▲66.3942.59 ▼0.91
Posts /wp-admin/edit.php2,406 ▲3146.27 ▲4.2677.95 ▲32.5534.82 ▼4.64
Add New Post /wp-admin/post-new.php6,247 ▲4,72522.12 ▼1.09990.78 ▲349.0353.67 ▼10.85
Media Library /wp-admin/upload.php1,546 ▲1556.66 ▲2.46109.33 ▲9.9447.87 ▲4.12
Crowdcue /wp-admin/crb_carbon_fields_container_crowdcue.php260.440.0915.87
Events /wp-admin/edit.php?post_type=og_events1,3946.2570.0927.77
Add New /wp-admin/post-new.php?post_type=og_events1,9997.96125.9534.28

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/crowdcue/crowdcue.php
    • > /wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 112× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Custom_Comparer.php:7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Notice
      Undefined variable: plural in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Template_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Field/Separator_Field.php:9
    • > PHP Notice
      Undefined variable: plural in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Field/Header_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Field/Checkbox_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/crowdcue/vendor/htmlburger/carbon-fields/core/Field/Association_Field.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/crb_carbon_fields_container_crowdcue.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_crowdcue.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

crowdcue/crowdcue.php Passed 13 tests

"Crowdcue" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
112 characters long description:
Crowdcue allows you to easily output a beautiful and simple events page without any coding using OccasionGenius.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin126,712 lines of code in 578 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28920,64920,53777,660
JSON260030,648
PHP1482,8706,95710,494
PO File268191,0202,202
Sass4833901,769
CSS103281,1421,678
Markdown2178801,540
TypeScript7132514692
HTML232021
YAML1008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.56
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes123
▷ Abstract classes118.94%
▷ Concrete classes11291.06%
▷ Final classes10.89%
Methods948
▷ Static methods10511.08%
▷ Public methods77882.07%
▷ Protected methods16517.41%
▷ Private methods50.53%
Functions114
▷ Named functions2118.42%
▷ Anonymous functions9381.58%
Constants29
▷ Global constants620.69%
▷ Class constants2379.31%
▷ Public constants23100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 11.94MB with 5.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/v1_3_0_img_1.png1,273.69KB324.54KB▼ 74.52%
og-events/public/logo192.png5.22KB5.57KB0.00%
og-events/build/logo192.png5.22KB5.57KB0.00%
public/images/v0_9_0_img3.png1,113.90KB294.70KB▼ 73.54%
public/images/v0_9_0_img2.png1,020.24KB321.55KB▼ 68.48%